]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: simplify locking for network notifier.
authorNeilBrown <neilb@suse.de>
Mon, 29 Nov 2021 04:51:25 +0000 (15:51 +1100)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 13 Dec 2021 18:42:54 +0000 (13:42 -0500)
commit4b9e6c420c80a327834843c2606cf5ef135175e8
treec7817ff5cb77c3b2efc198a0949b6a9a8c41176d
parent6d70604b02d7c8ec260fe197a70c2a989ef539de
NFSD: simplify locking for network notifier.

nfsd currently maintains an open-coded read/write semaphore (refcount
and wait queue) for each network namespace to ensure the nfs service
isn't shut down while the notifier is running.

This is excessive.  As there is unlikely to be contention between
notifiers and they run without sleeping, a single spinlock is sufficient
to avoid problems.

Signed-off-by: NeilBrown <neilb@suse.de>
[ cel: ensure nfsd_notifier_lock is static ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/netns.h
fs/nfsd/nfsctl.c
fs/nfsd/nfssvc.c