Commit 565e0450 authored by Aliaksei Karaliou's avatar Aliaksei Karaliou Committed by Shaohua Li

md/raid5: simplify uninitialization of shrinker

Don't use shrinker.nr_deferred to check whether shrinker was
initialized or not. Now this check was integrated into
unregister_shrinker(), so it is safe to call it against
unregistered shrinker.
Signed-off-by: default avatarAliaksei Karaliou <akaraliou.dev@gmail.com>
Signed-off-by: default avatarShaohua Li <sh.li@alibaba-inc.com>
parent c786427f
......@@ -6764,9 +6764,7 @@ static void free_conf(struct r5conf *conf)
log_exit(conf);
if (conf->shrinker.nr_deferred)
unregister_shrinker(&conf->shrinker);
unregister_shrinker(&conf->shrinker);
free_thread_groups(conf);
shrink_stripes(conf);
raid5_free_percpu(conf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment