Whamcloud - gitweb
LU-12477 lustre: check return status of register_shrinker()
register_shrinker() can fail with -ENOMEM. We should check for that
and abort the relevant initialization functions when it happens.
For ldlm_pools, ldlm_pools_fini() can be called when ldlm_pools_init()
fails, or even in case where it hasn't been called. So add a static
flag to ensure we ldlm_pools_fini() does undo things that haven't been
done.
For lu_global_init() we need to add proper cleanup if anything fails.
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ie66326486c7738547d4211095bb1d37dc75e0b6a
Reviewed-on: https://review.whamcloud.com/40883
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>