Skip to contentSkip to conversation

nfsd: put the export reference in nfsd4_verify_deleg_dentry

PATCH Applied Jeff Layton 2 participants 2 messages Nov 8, 2022

Subsystems (2)
lore
Share & tools
lore

Jeff Layton

author maintainer
#0 lore raw

PATCH 1/1 nfsd: put the export reference in nfsd4_verify_deleg_dentry

nfsd_lookup_dentry returns an export reference in addition to the dentry ref. Ensure that we put it too.

Fixes 876c553cb410 ("NFSD: verify the opened dentry after setting a delegation")
---
 fs/nfsd/nfs4state.c | 1 +
 1 file changed, 1 insertion(+)
fs/nfsd/nfs4state.c +1 -0
index 554c4e50caf8..2ec981fd2985 100644
@@ -5407,6 +5407,7 @@ nfsd4_verify_deleg_dentry(struct nfsd4_open *open, struct nfs4_file *fp,
 	if (err)
 		return -EAGAIN;
 
+	exp_put(exp);
 	dput(child);
 	if (child != file_dentry(fp->fi_deleg_file->nf_file))
 		return -EAGAIN;
Signature · 1 line
2.38.1
#1 lore raw
Quoted 11 lines · Jeff Layton

nfsd_lookup_dentry returns an export reference in addition to the dentry ref. Ensure that we put it too.

Fixes 876c553cb410 ("NFSD: verify the opened dentry after setting a delegation")

Applied to nfsd's for-rc (-> 6.1-rc). Thank you both!

Quoted 19 lines

---
fs/nfsd/nfs4state.c | 1 +

1 file changed, 1 insertion(+)
fs/nfsd/nfs4state.c +1 -0
index 554c4e50caf8..2ec981fd2985 100644
@@ -5407,6 +5407,7 @@ nfsd4_verify_deleg_dentry(struct nfsd4_open *open, struct nfs4_file *fp,
 	if (err)
 		return -EAGAIN;
 
+	exp_put(exp);
 	dput(child);
 	if (child != file_dentry(fp->fi_deleg_file->nf_file))
 		return -EAGAIN;
Signature · 1 line
2.38.1

--
Chuck Lever