projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e8f324
)
nfs: Add missing release on error in nfs_lock_and_join_requests()
author
Dan Carpenter
<dan.carpenter@linaro.org>
Wed, 2 Apr 2025 11:02:40 +0000
(14:02 +0300)
committer
Trond Myklebust
<trond.myklebust@hammerspace.com>
Wed, 2 Apr 2025 13:53:16 +0000
(09:53 -0400)
Call nfs_release_request() on this error path before returning.
Fixes:
c3f2235782c3
("nfs: fold nfs_folio_find_and_lock_request into nfs_lock_and_join_requests")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link:
https://lore.kernel.org/r/3aaaa3d5-1c8a-41e4-98c7-717801ddd171@stanley.mountain
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/write.c
patch
|
blob
|
history
diff --git
a/fs/nfs/write.c
b/fs/nfs/write.c
index
aa3d8be
..
23df8b2
100644
(file)
--- a/
fs/nfs/write.c
+++ b/
fs/nfs/write.c
@@
-579,8
+579,10
@@
retry:
while (!nfs_lock_request(head)) {
ret = nfs_wait_on_request(head);
- if (ret < 0)
+ if (ret < 0) {
+ nfs_release_request(head);
return ERR_PTR(ret);
+ }
}
/* Ensure that nobody removed the request before we locked it */