diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-04-01 10:07:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-17 10:48:51 +0200 |
commit | 194a805daefa883e76f02309848d0dae48a8558b (patch) | |
tree | 0bafac80faba0b06e99464d808c43239bcdcc652 /fs/nfs | |
parent | 83dc8f0a91343012eefa7f2f1b9c11f8aed7c2e3 (diff) | |
download | linux-stable-194a805daefa883e76f02309848d0dae48a8558b.tar.gz linux-stable-194a805daefa883e76f02309848d0dae48a8558b.tar.bz2 linux-stable-194a805daefa883e76f02309848d0dae48a8558b.zip |
NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
commit add42de31721fa29ed77a7ce388674d69f9d31a4 upstream.
When we detach a subrequest from the list, we must also release the
reference it holds to the parent.
Fixes: 5b2b5187fa85 ("NFS: Fix nfs_page_group_destroy() and nfs_lock_and_join_requests() race cases")
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/write.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index ce1da8cbac00..63d20308a9bb 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -432,6 +432,7 @@ nfs_destroy_unlinked_subrequests(struct nfs_page *destroy_list, } subreq->wb_head = subreq; + nfs_release_request(old_head); if (test_and_clear_bit(PG_INODE_REF, &subreq->wb_flags)) { nfs_release_request(subreq); |