From: Jeff Layton Date: Tue, 8 Nov 2022 16:23:11 +0000 (-0500) Subject: nfsd: put the export reference in nfsd4_verify_deleg_dentry X-Git-Tag: v6.6.17~6123^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50256e4793a5e5ab77703c82a47344ad2e774a59;p=platform%2Fkernel%2Flinux-rpi.git 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: 876c553cb410 ("NFSD: verify the opened dentry after setting a delegation") Reported-by: Yongcheng Yang Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 198d7ab..4f4706f 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5382,6 +5382,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;