Skip to content

Commit add42de

Browse files
author
Trond Myklebust
committed
NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
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: [email protected] # v4.14+ Signed-off-by: Trond Myklebust <[email protected]>
1 parent f764a1e commit add42de

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
@@ -444,6 +444,7 @@ nfs_destroy_unlinked_subrequests(struct nfs_page *destroy_list,
444444
}
445445

446446
subreq->wb_head = subreq;
447+
nfs_release_request(old_head);
447448

448449
if (test_and_clear_bit(PG_INODE_REF, &subreq->wb_flags)) {
449450
nfs_release_request(subreq);

0 commit comments

Comments
 (0)