]> git.ipfire.org Git - thirdparty/linux.git/commit
SUNRPC: change sp_nrthreads to atomic_t
authorNeilBrown <neilb@suse.de>
Mon, 11 Sep 2023 14:40:09 +0000 (10:40 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 16 Oct 2023 16:44:07 +0000 (12:44 -0400)
commit2e8fc923fe476db8cab9b6458027eccb22f3b6e6
tree5b143877a907eb433062042d60d09f469b2a9728
parent9a0e6accc0a8c3adf72f1b43be8019961b68663a
SUNRPC: change sp_nrthreads to atomic_t

Using an atomic_t avoids the need to take a spinlock (which can soon be
removed).

Choosing a thread to kill needs to be careful as we cannot set the "die
now" bit atomically with the test on the count.  Instead we temporarily
increase the count.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfssvc.c
include/linux/sunrpc/svc.h
net/sunrpc/svc.c