NeilBrown 8c62d12740 SUNRPC/NFSD: clean up get/put functions.
svc_destroy() is poorly named - it doesn't necessarily destroy the svc,
it might just reduce the ref count.
nfsd_destroy() is poorly named for the same reason.

This patch:
 - removes the refcount functionality from svc_destroy(), moving it to
   a new svc_put().  Almost all previous callers of svc_destroy() now
   call svc_put().
 - renames nfsd_destroy() to nfsd_put() and improves the code, using
   the new svc_destroy() rather than svc_put()
 - removes a few comments that explain the important for balanced
   get/put calls.  This should be obvious.

The only non-trivial part of this is that svc_destroy() would call
svc_sock_update() on a non-final decrement.  It can no longer do that,
and svc_put() isn't really a good place of it.  This call is now made
from svc_exit_thread() which seems like a good place.  This makes the
call *before* sv_nrthreads is decremented rather than after.  This
is not particularly important as the call just sets a flag which
causes sv_nrthreads set be checked later.  A subsequent patch will
improve the ordering.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2021-12-13 13:42:50 -05:00
..
2021-02-23 13:39:45 -08:00
2021-01-25 09:36:28 -05:00
2021-10-02 15:51:10 -04:00
2021-10-02 15:51:10 -04:00
2020-09-25 18:01:26 -04:00
2021-01-24 14:27:17 +01:00
2021-10-02 15:51:10 -04:00
2021-12-13 13:42:49 -05:00
2021-09-21 18:21:34 -04:00
2021-10-02 15:51:10 -04:00
2021-10-02 15:51:10 -04:00
2021-01-25 09:36:28 -05:00
2021-11-01 17:17:14 -04:00
2018-09-25 20:34:54 -04:00