diff options
author | NeilBrown <neilb@suse.de> | 2021-11-29 07:51:25 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-12-13 21:42:57 +0300 |
commit | 93aa619eb0b42eec2f3a9b4d9db41f5095390aec (patch) | |
tree | addcbb2bf8c6857ec19c01045aebbeea1ae3f636 /crypto | |
parent | cf0e124e0a489944d08fcc3c694d2b234d2cc658 (diff) | |
download | linux-93aa619eb0b42eec2f3a9b4d9db41f5095390aec.tar.xz |
SUNRPC: always treat sv_nrpools==1 as "not pooled"
Currently 'pooled' services hold a reference on the pool_map, and
'unpooled' services do not.
svc_destroy() uses the presence of ->svo_function (via
svc_serv_is_pooled()) to determine if the reference should be dropped.
There is no direct correlation between being pooled and the use of
svo_function, though in practice, lockd is the only non-pooled service,
and the only one not to use svo_function.
This is untidy and would cause problems if we changed lockd to use
svc_set_num_threads(), which requires the use of ->svo_function.
So change the test for "is the service pooled" to "is sv_nrpools > 1".
This means that when svc_pool_map_get() returns 1, it must NOT take a
reference to the pool.
We discard svc_serv_is_pooled(), and test sv_nrpools directly.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions