mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
NFS: Try to commit unstable writes in nfs_release_page()
commit 82be934a59 upstream.
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>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1f9382ec17
commit
438b9c70b8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user