mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 23:20:32 -04:00
staging/lustre/ldlm: In ldlm_pools_fini make sure there was init first.
It turns out if you call ldlm_pools_fini without completing the ldlm_pools_init, then attempt to unregister not yet registered shrinkers makes the kernel very unhappy. So make sure we have them registered first. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6a491f2b80
commit
faa7a4e3e0
@@ -1486,8 +1486,10 @@ EXPORT_SYMBOL(ldlm_pools_init);
|
||||
|
||||
void ldlm_pools_fini(void)
|
||||
{
|
||||
unregister_shrinker(&ldlm_pools_srv_shrinker);
|
||||
unregister_shrinker(&ldlm_pools_cli_shrinker);
|
||||
if (ldlm_pools_thread) {
|
||||
unregister_shrinker(&ldlm_pools_srv_shrinker);
|
||||
unregister_shrinker(&ldlm_pools_cli_shrinker);
|
||||
}
|
||||
ldlm_pools_thread_stop();
|
||||
}
|
||||
EXPORT_SYMBOL(ldlm_pools_fini);
|
||||
|
||||
Reference in New Issue
Block a user