]> git.ipfire.org Git - thirdparty/linux.git/commit
nfsd: convert global state_lock to per-net deleg_lock
authorJeff Layton <jlayton@kernel.org>
Tue, 24 Feb 2026 13:28:11 +0000 (08:28 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 30 Mar 2026 01:25:09 +0000 (21:25 -0400)
commit8be12e0cf21110f1e0b7fd21711ff13fb75bee72
treeedf5a39029c97ed65e4bc5abe6dd700fa8d8d7a6
parentfacc4e3c80420e3466003ce09b576e005b56a015
nfsd: convert global state_lock to per-net deleg_lock

Replace the global state_lock spinlock with a per-nfsd_net deleg_lock.
The state_lock was only used to protect delegation lifecycle operations
(the del_recall_lru list and delegation hash/unhash), all of which are
scoped to a single network namespace. Making the lock per-net removes
a source of unnecessary contention between containers.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/netns.h
fs/nfsd/nfs4state.c
fs/nfsd/state.h