提交 a8753f02 编写于 作者: A Aliaksei Karaliou 提交者: Greg Kroah-Hartman

drivers: lustre: obdclass: simplify unregister_shrinker() usage

lu_global_fini() explicitly uses knowledge about shrinker's
internals to make decision about calling of unregister_shrinker().
Now this check was integrated into unregister_shrinker(),
so it is safe to call it against unregistered shrinker.
Signed-off-by: NAliaksei Karaliou <akaraliou.dev@gmail.com>
Reviewed-by: NAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 915fd1c2
......@@ -1977,8 +1977,7 @@ int lu_global_init(void)
*/
void lu_global_fini(void)
{
if (lu_site_shrinker.nr_deferred)
unregister_shrinker(&lu_site_shrinker);
unregister_shrinker(&lu_site_shrinker);
lu_context_key_degister(&lu_global_key);
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部