Skip to content

Commit f02cec9

Browse files
author
Trond Myklebust
committed
NFS: Fix a request reference leak in nfs_direct_write_clear_reqs()
nfs_direct_write_scan_commit_list() will lock the request and bump the reference count, but we also need to account for the reference that was taken when we initially added the request to the commit list. Fixes: fb5f7f2 ("NFS: commit errors should be fatal") Signed-off-by: Trond Myklebust <[email protected]>
1 parent dc9dc2f commit f02cec9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfs/direct.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ static void nfs_direct_write_clear_reqs(struct nfs_direct_req *dreq)
646646
while (!list_empty(&reqs)) {
647647
req = nfs_list_entry(reqs.next);
648648
nfs_list_remove_request(req);
649+
nfs_release_request(req);
649650
nfs_unlock_and_release_request(req);
650651
}
651652
}

0 commit comments

Comments
 (0)