staging: lustre: ptlrpc: move thread creation out of module initialization
authorNeilBrown <neilb@suse.com>
Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Mar 2018 12:20:23 +0000 (04:20 -0800)
commit26f7a294e5ecd46856cb9f5b718e995f1ec46779
treecc399900348b213709dbf8915791c8e49906b2fa
parent165020462d26d6925cbd2d25dfbd4ff1a8fba103
staging: lustre: ptlrpc: move thread creation out of module initialization

When the ptlrpc module is loaded, it starts the pinger thread and
calls LNetNIInit which starts various threads.

We don't need these threads until the module is actually being
used, such as when a lustre filesystem is mounted.

So move the thread creation into new ptlrpc_inc_ref() (modeled on
ptlrpcd_inc_ref()), and call that when needed, such as at mount time.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_net.h
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c