Whamcloud - gitweb
LU-9679 lustre: make ptlrpc_connection_put() static inline 91/39291/3
authorMr NeilBrown <neilb@suse.de>
Mon, 6 Jul 2020 12:34:48 +0000 (08:34 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 17 Jul 2020 19:29:25 +0000 (19:29 +0000)
commit0a03e51b7e49a319a288c7c2be367c90e63d045d
tree3e0a818809f539431ce52db46ec9843845c5090f
parent10dae4c3b68ebc2509d7089037eccc9f4460c08f
LU-9679 lustre: make ptlrpc_connection_put() static inline

This function needs to be called from the obdclass modules,
but is currently defined in a module that depends on that module.
The get around this interdependence, a global variable
  ptlrpc_put_connection_superhack
is used to make a pointer to the function available.

Rather than this hack, we can make ptlrpc_connection_put()
static-inline.  This does expose some details of ptlrpc to obdclass,
but there is already a fairly tight connection.

Also change the return value to 'void' as it is never used,
and don't bother checking for NULL before calling, as the
function has its own test for NULL.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I37333b78e410e8c46bddc468c31bed61dd9e7b33
Reviewed-on: https://review.whamcloud.com/39291
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_net.h
lustre/include/obd_class.h
lustre/ldlm/ldlm_lib.c
lustre/obdclass/genops.c
lustre/ptlrpc/connection.c
lustre/ptlrpc/import.c
lustre/ptlrpc/ptlrpc_module.c