NFS: Ensure we only call set_page_writeback() under the page lock

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust
2006-12-05 00:35:42 -05:00
parent e261f51f25
commit 61822ab5e3
3 changed files with 30 additions and 15 deletions

View File

@@ -307,14 +307,10 @@ static int nfs_commit_write(struct file *file, struct page *page, unsigned offse
static void nfs_invalidate_page(struct page *page, unsigned long offset)
{
loff_t range_start, range_end;
if (offset != 0)
return;
/* Cancel any unstarted writes on this page */
range_start = page_offset(page);
range_end = range_start + (loff_t)(PAGE_CACHE_SIZE - 1);
nfs_sync_mapping_range(page->mapping, range_start, range_end, FLUSH_INVALIDATE);
nfs_wb_page_priority(page->mapping->host, page, FLUSH_INVALIDATE);
}
static int nfs_release_page(struct page *page, gfp_t gfp)