Skip to content

Commit

Permalink
NFS: Try to commit unstable writes in nfs_release_page()
Browse files Browse the repository at this point in the history
If someone calls nfs_release_page(), we presumably already know that the
page is clean, however it may be holding an unstable write.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jan 26, 2010
1 parent c9edda7 commit 82be934
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ static int nfs_release_page(struct page *page, gfp_t gfp)
{
dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);

if (gfp & __GFP_WAIT)
nfs_wb_page(page->mapping->host, page);
/* If PagePrivate() is set, then the page is not freeable */
if (PagePrivate(page))
return 0;
Expand Down

0 comments on commit 82be934

Please sign in to comment.