]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfsd: refine and rename NFSD_MAY_LOCK
authorNeilBrown <neilb@suse.de>
Thu, 17 Oct 2024 21:42:31 +0000 (08:42 +1100)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 19 Nov 2024 01:23:00 +0000 (20:23 -0500)
commit4cc9b9f2bf4dfe13fe573da978e626e2248df388
tree706d0b057e487b06cfd9dedeb47e25923d64726e
parent6640556b0c80edc66d6f50abe53f00311a873536
nfsd: refine and rename NFSD_MAY_LOCK

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>
fs/nfsd/lockd.c
fs/nfsd/nfsfh.c
fs/nfsd/trace.h
fs/nfsd/vfs.c
fs/nfsd/vfs.h