From 61822ab5e3ed09fcfc49e37227b655202adf6130 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Tue, 5 Dec 2006 00:35:42 -0500
Subject: NFS: Ensure we only call set_page_writeback() under the page lock

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
 fs/nfs/file.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

(limited to 'fs/nfs/file.c')

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index c2fe3bd83ab1..238fb6641aae 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -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)
-- 
cgit v1.2.1