diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/ldlm/ldlm_pool.c')
-rw-r--r-- | drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c index da65d00a7811..8563bd32befa 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c @@ -1086,8 +1086,12 @@ int ldlm_pools_init(void) int rc; rc = ldlm_pools_thread_start(); - if (rc == 0) - register_shrinker(&ldlm_pools_cli_shrinker); + if (rc) + return rc; + + rc = register_shrinker(&ldlm_pools_cli_shrinker); + if (rc) + ldlm_pools_thread_stop(); return rc; } |