]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd: refine and rename NFSD_MAY_LOCK
authorNeilBrown <neilb@suse.de>
Wed, 15 Oct 2025 22:08:44 +0000 (18:08 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 14:34:03 +0000 (16:34 +0200)
commit18744bc56b0ec34b0fe397ee71c2ffdc48c6a0e0
treefd33d13dd13ee39ef848389c37dc1c51b46a003a
parent763d4aa418456afb2e1bdef27216332352813aad
nfsd: refine and rename NFSD_MAY_LOCK

[ Upstream commit 4cc9b9f2bf4dfe13fe573da978e626e2248df388 ]

NFSD_MAY_LOCK means a few different things.
- it means that GSS is not required.
- it means that with NFSEXP_NOAUTHNLM, authentication is not required
- it means that OWNER_OVERRIDE is allowed.

None of these are specific to locking, they are specific to the NLM
protocol.
So:
 - rename to NFSD_MAY_NLM
 - set NFSD_MAY_OWNER_OVERRIDE and NFSD_MAY_BYPASS_GSS in nlm_fopen()
   so that NFSD_MAY_NLM doesn't need to imply these.
 - move the test on NFSEXP_NOAUTHNLM out of nfsd_permission() and
   into fh_verify where other special-case tests on the MAY flags
   happen.  nfsd_permission() can be called from other places than
   fh_verify(), but none of these will have NFSD_MAY_NLM.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Stable-dep-of: 898374fdd7f0 ("nfsd: unregister with rpcbind when deleting a transport")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/lockd.c
fs/nfsd/nfsfh.c
fs/nfsd/trace.h
fs/nfsd/vfs.c
fs/nfsd/vfs.h