Commit 50256e47 authored by Jeff Layton's avatar Jeff Layton Committed by Chuck Lever

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.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2138866
Fixes: 876c553c ("NFSD: verify the opened dentry after setting a delegation")
Reported-by: default avatarYongcheng Yang <yoyang@redhat.com>
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent bdd6b562
...@@ -5382,6 +5382,7 @@ nfsd4_verify_deleg_dentry(struct nfsd4_open *open, struct nfs4_file *fp, ...@@ -5382,6 +5382,7 @@ nfsd4_verify_deleg_dentry(struct nfsd4_open *open, struct nfs4_file *fp,
if (err) if (err)
return -EAGAIN; return -EAGAIN;
exp_put(exp);
dput(child); dput(child);
if (child != file_dentry(fp->fi_deleg_file->nf_file)) if (child != file_dentry(fp->fi_deleg_file->nf_file))
return -EAGAIN; return -EAGAIN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment