aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 7a79fbe9f539..387809f2d188 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -316,6 +316,17 @@ static int nfs_commit_write(struct file *file, struct page *page, unsigned offse
316 return status; 316 return status;
317} 317}
318 318
319static int nfs_invalidate_page(struct page *page, unsigned long offset)
320{
321 /* FIXME: we really should cancel any unstarted writes on this page */
322 return 1;
323}
324
325static int nfs_release_page(struct page *page, gfp_t gfp)
326{
327 return !nfs_wb_page(page->mapping->host, page);
328}
329
319struct address_space_operations nfs_file_aops = { 330struct address_space_operations nfs_file_aops = {
320 .readpage = nfs_readpage, 331 .readpage = nfs_readpage,
321 .readpages = nfs_readpages, 332 .readpages = nfs_readpages,
@@ -324,6 +335,8 @@ struct address_space_operations nfs_file_aops = {
324 .writepages = nfs_writepages, 335 .writepages = nfs_writepages,
325 .prepare_write = nfs_prepare_write, 336 .prepare_write = nfs_prepare_write,
326 .commit_write = nfs_commit_write, 337 .commit_write = nfs_commit_write,
338 .invalidatepage = nfs_invalidate_page,
339 .releasepage = nfs_release_page,
327#ifdef CONFIG_NFS_DIRECTIO 340#ifdef CONFIG_NFS_DIRECTIO
328 .direct_IO = nfs_direct_IO, 341 .direct_IO = nfs_direct_IO,
329#endif 342#endif