summaryrefslogtreecommitdiff
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorAliaksei Karaliou <akaraliou.dev@gmail.com>2017-12-23 21:20:31 +0300
committerShaohua Li <sh.li@alibaba-inc.com>2018-02-17 23:35:34 +0300
commit565e0450129647df5112bff3df3ffd02b0c08e32 (patch)
treea38e3b14354b597b2c31dc192915c27c8811f8f5 /drivers/md/raid5.c
parentc786427f57b6dc4f56f9a84da52b41216e94f125 (diff)
downloadlinux-565e0450129647df5112bff3df3ffd02b0c08e32.tar.xz
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: Aliaksei Karaliou <akaraliou.dev@gmail.com> Signed-off-by: Shaohua Li <sh.li@alibaba-inc.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 50d01144b805..36e050678f5a 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -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);