aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-05-31 01:13:38 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:34:14 -0400
commitd2ccddf042c403b146159beea438c6bfc4a445e2 (patch)
treee38f5faeccb73cacd442e899328ae44b75f15559 /fs/nfs/file.c
parentc04871e6345e4c6dfda564e302d7fd8c66420fd5 (diff)
NFS: Flesh out nfs_invalidate_page()
In the case of a call to truncate_inode_pages(), we should really try to cancel any pending writes on the page. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 63154070145a..106ef0dec04d 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -303,7 +303,11 @@ static int nfs_commit_write(struct file *file, struct page *page, unsigned offse
303 303
304static void nfs_invalidate_page(struct page *page, unsigned long offset) 304static void nfs_invalidate_page(struct page *page, unsigned long offset)
305{ 305{
306 /* FIXME: we really should cancel any unstarted writes on this page */ 306 struct inode *inode = page->mapping->host;
307
308 /* Cancel any unstarted writes on this page */
309 if (offset == 0)
310 nfs_sync_inode_wait(inode, page->index, 1, FLUSH_INVALIDATE);
307} 311}
308 312
309static int nfs_release_page(struct page *page, gfp_t gfp) 313static int nfs_release_page(struct page *page, gfp_t gfp)