projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2227a3
)
nfsd: Fix a file leak on nfsd4_layout_setlease failure
author
Kinglong Mee
<kinglongmee@gmail.com>
Thu, 9 Jul 2015 09:38:26 +0000
(17:38 +0800)
committer
J. Bruce Fields
<bfields@redhat.com>
Mon, 20 Jul 2015 18:58:22 +0000
(14:58 -0400)
If nfsd4_layout_setlease fails, nfsd will not put ls->ls_file.
Fix commit
c5c707f96f
"nfsd: implement pNFS layout recalls".
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4layouts.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfsd/nfs4layouts.c
b/fs/nfsd/nfs4layouts.c
index 6904213a436368e47628af85701a3beb68e0550b..ebf90e487c752b59270aa559588a8805468ad0f5 100644
(file)
--- a/
fs/nfsd/nfs4layouts.c
+++ b/
fs/nfsd/nfs4layouts.c
@@
-212,6
+212,7
@@
nfsd4_alloc_layout_stateid(struct nfsd4_compound_state *cstate,
BUG_ON(!ls->ls_file);
if (nfsd4_layout_setlease(ls)) {
+ fput(ls->ls_file);
put_nfs4_file(fp);
kmem_cache_free(nfs4_layout_stateid_cache, ls);
return NULL;