Skip to content

Commit

Permalink
NFS: Fix nfs_release_page
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Dec 6, 2006
1 parent 61822ab commit fa8d8c5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit fa8d8c5

Please sign in to comment.