diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-03-30 20:13:48 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-04-01 13:37:56 -0400 |
commit | f02cec9d33e0069c11e58f97529c1d697255889d (patch) | |
tree | 039a517696c762c215244ff273c678ee4ef20c39 /fs/nfs | |
parent | dc9dc2febb17f72e9878eb540ad3996f7984239a (diff) | |
download | linux-f02cec9d33e0069c11e58f97529c1d697255889d.tar.gz linux-f02cec9d33e0069c11e58f97529c1d697255889d.tar.bz2 linux-f02cec9d33e0069c11e58f97529c1d697255889d.zip |
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: fb5f7f20cdb9 ("NFS: commit errors should be fatal")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/direct.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 51ab4627c4d6..8074304fd5b4 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -646,6 +646,7 @@ static void nfs_direct_write_clear_reqs(struct nfs_direct_req *dreq) while (!list_empty(&reqs)) { req = nfs_list_entry(reqs.next); nfs_list_remove_request(req); + nfs_release_request(req); nfs_unlock_and_release_request(req); } } |