Whamcloud - gitweb
LU-10391 lnet: simplify use of lnet_count_acceptor_nets() 95/37695/8
authorMr NeilBrown <neilb@suse.de>
Fri, 7 Feb 2020 02:05:57 +0000 (13:05 +1100)
committerOleg Drokin <green@whamcloud.com>
Tue, 14 Apr 2020 08:09:16 +0000 (08:09 +0000)
commit1477027d073be1efb6ffbb368ed68b97a65c72f1
tree5e3026aeccc91aafb0b1d9506396dfdc8cfaa95b
parent9c2fb0b29cec8a02c0c080da7596c2c99921d47d
LU-10391 lnet: simplify use of lnet_count_acceptor_nets()

Instead of calling this in various places before either
lnet_acceptor_start() or lnet_acceptor_stop(), only call
it in those functions.
It is already called in lnet_acceptor_start().

At shutdown, lnet_acceptor_stop() must succeed unconditionally, so
include a test on the_lnet.ln_refcount.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I11ef6c1a226e7b752b540f37651c766e83c5cb52
Reviewed-on: https://review.whamcloud.com/37695
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/acceptor.c
lnet/lnet/api-ni.c