]> git.hungrycats.org Git - linux/commit
sunrpc: change sp_nrthreads from atomic_t to unsigned int.
authorNeilBrown <neilb@suse.de>
Mon, 15 Jul 2024 07:14:18 +0000 (17:14 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:01:10 +0000 (12:01 +0200)
commit17c0cbfd22743d1f3f0f9239d65cc6fd1418ce4d
tree86a5e01af4e9b17daa58afb009a1b20cb630355b
parent49430bda7c68fa94fa81f8f20f0c5606176ab4db
sunrpc: change sp_nrthreads from atomic_t to unsigned int.

[ Upstream commit 60749cbe3d8ae572a6c7dda675de3e8b25797a18 ]

sp_nrthreads is only ever accessed under the service mutex
  nlmsvc_mutex nfs_callback_mutex nfsd_mutex
so these is no need for it to be an atomic_t.

The fact that all code using it is single-threaded means that we can
simplify svc_pool_victim and remove the temporary elevation of
sp_nrthreads.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Stable-dep-of: aadc3bbea163 ("NFSD: Limit the number of concurrent async COPY operations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfsctl.c
fs/nfsd/nfssvc.c
include/linux/sunrpc/svc.h
net/sunrpc/svc.c