Skip to content

Commit 194a805

Browse files
Trond Myklebustgregkh
authored andcommitted
NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
commit add42de upstream. When we detach a subrequest from the list, we must also release the reference it holds to the parent. Fixes: 5b2b518 ("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>
1 parent 83dc8f0 commit 194a805

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfs/write.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ nfs_destroy_unlinked_subrequests(struct nfs_page *destroy_list,
432432
}
433433

434434
subreq->wb_head = subreq;
435+
nfs_release_request(old_head);
435436

436437
if (test_and_clear_bit(PG_INODE_REF, &subreq->wb_flags)) {
437438
nfs_release_request(subreq);

0 commit comments

Comments
 (0)