NeilBrown 1e3577a452 SUNRPC: discard sv_refcnt, and svc_get/svc_put
sv_refcnt is no longer useful.
lockd and nfs-cb only ever have the svc active when there are a non-zero
number of threads, so sv_refcnt mirrors sv_nrthreads.

nfsd also keeps the svc active between when a socket is added and when
the first thread is started, but we don't really need a refcount for
that.  We can simply not destroy the svc while there are any permanent
sockets attached.

So remove sv_refcnt and the get/put functions.
Instead of a final call to svc_put(), call svc_destroy() instead.
This is changed to also store NULL in the passed-in pointer to make it
easier to avoid use-after-free situations.

Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-01-07 17:54:33 -05:00
..
2017-11-17 14:18:00 -08:00
2017-11-17 14:18:00 -08:00
2023-08-24 13:24:15 -04:00
2021-04-05 09:04:20 -04:00
2023-03-06 09:57:12 +01:00
2023-03-06 09:57:12 +01:00
2023-11-08 13:39:16 -08:00
2023-11-08 13:39:16 -08:00
2023-10-09 16:24:20 +02:00
2023-11-08 13:39:16 -08:00
2022-05-09 16:36:48 -04:00
2023-08-19 10:26:29 -04:00
2022-11-27 22:10:00 -05:00