diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-01-26 15:41:53 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-02-23 07:37:50 -0800 |
commit | 438b9c70b8800b0c12ec6bc784e00bbae24a75ca (patch) | |
tree | 13aba27417f26dba8527338a46c271691dc4f5e2 /fs | |
parent | 1f9382ec17cc4fa5344b871658345e569fba8af7 (diff) |
NFS: Try to commit unstable writes in nfs_release_page()
commit 82be934a59ff891cac598727e5a862ba2b9d1fac 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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index f5fdd39e037..393d40fd7eb 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -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; |