summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-05 06:35:42 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-06 16:46:40 +0100
commitfa8d8c5b77a2dc467b5365a5651710161b84f16d (patch)
tree64e302d72abd41bc44b78ee9f7cac9c03872d46f /fs/nfs
parentNFS: Ensure we only call set_page_writeback() under the page lock (diff)
downloadlinux-fa8d8c5b77a2dc467b5365a5651710161b84f16d.tar.xz
linux-fa8d8c5b77a2dc467b5365a5651710161b84f16d.zip
NFS: Fix nfs_release_page
invalidate_inode_pages2_range() will clear the PG_dirty bit before calling try_to_release_page(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/file.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 238fb6641aae..8e28bffc35a0 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -315,13 +315,14 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset)
static int nfs_release_page(struct page *page, gfp_t gfp)
{
- if (gfp & __GFP_FS)
- return !nfs_wb_page(page->mapping->host, page);
- else
- /*
- * Avoid deadlock on nfs_wait_on_request().
- */
+ /*
+ * Avoid deadlock on nfs_wait_on_request().
+ */
+ if (!(gfp & __GFP_FS))
return 0;
+ /* Hack... Force nfs_wb_page() to write out the page */
+ SetPageDirty(page);
+ return !nfs_wb_page(page->mapping->host, page);
}
const struct address_space_operations nfs_file_aops = {