Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nfsd: allow DELEGRETURN on directories

As Trond pointed out: "...provided that the presented stateid is
actually valid, it is also sufficient to uniquely identify the file to
which it is associated (see RFC8881 Section 8.2.4), so the filehandle
should be considered mostly irrelevant for operations like DELEGRETURN."

Don't ask fh_verify to filter on file type.

Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20251111-dir-deleg-ro-v6-15-52f3feebb2f2@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Jeff Layton and committed by
Christian Brauner
80c8afdd 544a0ee1

+2 -1
+2 -1
fs/nfsd/nfs4state.c
··· 7828 7828 __be32 status; 7829 7829 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); 7830 7830 7831 - if ((status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0))) 7831 + status = fh_verify(rqstp, &cstate->current_fh, 0, 0); 7832 + if (status) 7832 7833 return status; 7833 7834 7834 7835 status = nfsd4_lookup_stateid(cstate, stateid, SC_TYPE_DELEG, SC_STATUS_REVOKED, &s, nn);