NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 1 Apr 2020 14:07:16 +0000 (10:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 06:00:43 +0000 (08:00 +0200)
commitc60aee180ba11443df2630f3e23e2915e3aacc17
treee50b8d1a46d737e667f77fb77059ab2815c8fdeb
parent98587165f7ad0d91cc7f76d9ef591a2cb743209e
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>
fs/nfs/write.c