提交 30c89465 编写于 作者: S Shaohua Li

raid5: handle register_shrinker failure

register_shrinker() now can fail. When it happens, shrinker.nr_deferred is
null. We use it to determine if unregister_shrinker is required.
Signed-off-by: NShaohua Li <shli@fb.com>
上级 6a0f53ff
...@@ -6372,7 +6372,7 @@ static void free_conf(struct r5conf *conf) ...@@ -6372,7 +6372,7 @@ static void free_conf(struct r5conf *conf)
{ {
if (conf->log) if (conf->log)
r5l_exit_log(conf->log); r5l_exit_log(conf->log);
if (conf->shrinker.seeks) if (conf->shrinker.nr_deferred)
unregister_shrinker(&conf->shrinker); unregister_shrinker(&conf->shrinker);
free_thread_groups(conf); free_thread_groups(conf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册