LU-12477 libcfs: Further reduce complexity for shrinkers.
Commit
c4c17fa4a3f5 ("LU-12477 libcfs: Remove obsolete config checks")
reduced the complexity of shinkers by removing support for older
kernels, but could have gone a lot further. This patch adds
further simplification.
Lustre-change: https://review.whamcloud.com/40831
Lustre-commit:
782725b11021b2f1c3467863216836ee94bcd874
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() do not undo things that haven't been
done.
For lu_global_init() we need to add proper cleanup if anything fails.
Lustre-change: https://review.whamcloud.com/40883
Lustre-commit:
812b2ccf0284df42e8a88a6b7c4c3874dd721c71
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Change-Id: Ibcc84f61e542b503f795b16a7144e430f8b73582
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51778
Tested-by: Jian Yu <yujian@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>