diff options
author | Shaohua Li <shli@fb.com> | 2016-09-21 09:07:13 -0700 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-09-21 09:09:44 -0700 |
commit | 30c8946566f32493f7f1143437319c42c8a542e9 (patch) | |
tree | 465f5ed5d5452d06fec4c415b5ca3742d70c3ac5 /drivers/md/raid5.c | |
parent | 6a0f53ff351dfd10e74752e57b9c27d3397a3c4d (diff) | |
download | linux-30c8946566f32493f7f1143437319c42c8a542e9.tar.bz2 |
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: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 08274b4b4009..f94472dd0323 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -6372,7 +6372,7 @@ static void free_conf(struct r5conf *conf) { if (conf->log) r5l_exit_log(conf->log); - if (conf->shrinker.seeks) + if (conf->shrinker.nr_deferred) unregister_shrinker(&conf->shrinker); free_thread_groups(conf); |