diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-05 00:35:42 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-06 10:46:40 -0500 |
commit | fa8d8c5b77a2dc467b5365a5651710161b84f16d (patch) | |
tree | 64e302d72abd41bc44b78ee9f7cac9c03872d46f /fs | |
parent | 61822ab5e3ed09fcfc49e37227b655202adf6130 (diff) |
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')
-rw-r--r-- | fs/nfs/file.c | 13 |
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) | |||
315 | 315 | ||
316 | static int nfs_release_page(struct page *page, gfp_t gfp) | 316 | static int nfs_release_page(struct page *page, gfp_t gfp) |
317 | { | 317 | { |
318 | if (gfp & __GFP_FS) | 318 | /* |
319 | return !nfs_wb_page(page->mapping->host, page); | 319 | * Avoid deadlock on nfs_wait_on_request(). |
320 | else | 320 | */ |
321 | /* | 321 | if (!(gfp & __GFP_FS)) |
322 | * Avoid deadlock on nfs_wait_on_request(). | ||
323 | */ | ||
324 | return 0; | 322 | return 0; |
323 | /* Hack... Force nfs_wb_page() to write out the page */ | ||
324 | SetPageDirty(page); | ||
325 | return !nfs_wb_page(page->mapping->host, page); | ||
325 | } | 326 | } |
326 | 327 | ||
327 | const struct address_space_operations nfs_file_aops = { | 328 | const struct address_space_operations nfs_file_aops = { |