summaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-10-09 16:18:38 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-06 10:46:35 -0500
commit1c75950b9a2254ef08f986e00ad20266ae9ba7f1 (patch)
treecc1a242601b27b8128c8c385f1b858a7b863f155 /fs/nfs/file.c
parent3f442547b76bf9fb70d7aecc41cf1980459253c9 (diff)
downloadlinux-stable-1c75950b9a2254ef08f986e00ad20266ae9ba7f1.tar.gz
linux-stable-1c75950b9a2254ef08f986e00ad20266ae9ba7f1.tar.bz2
linux-stable-1c75950b9a2254ef08f986e00ad20266ae9ba7f1.zip
NFS: cleanup of nfs_sync_inode_wait()
Allow callers to directly pass it a struct writeback_control. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index cc93865cea93..d6ee60fc3ba6 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -307,11 +307,14 @@ static int nfs_commit_write(struct file *file, struct page *page, unsigned offse
static void nfs_invalidate_page(struct page *page, unsigned long offset)
{
- struct inode *inode = page->mapping->host;
+ loff_t range_start, range_end;
+ if (offset != 0)
+ return;
/* Cancel any unstarted writes on this page */
- if (offset == 0)
- nfs_sync_inode_wait(inode, page->index, 1, FLUSH_INVALIDATE);
+ 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);
}
static int nfs_release_page(struct page *page, gfp_t gfp)