From: Trond Myklebust Date: Tue, 26 Jan 2010 20:41:53 +0000 (-0500) Subject: NFS: Try to commit unstable writes in nfs_release_page() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82be934a59ff891cac598727e5a862ba2b9d1fac;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git NFS: Try to commit unstable writes in nfs_release_page() 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 Cc: stable@kernel.org Reviewed-by: Chuck Lever --- diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 6b891328f33..63f2071d644 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;