diff options
author | Aliaksei Karaliou <akaraliou.dev@gmail.com> | 2017-12-23 14:13:16 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-08 16:03:45 +0100 |
commit | a8753f02eb65acc8490256ae7a632451be68006b (patch) | |
tree | 48354b3d9be8b770fa48f16182ed076b87a461b3 /drivers/staging/lustre | |
parent | 915fd1c2d1c4b05efda7975f992d54244178bc93 (diff) | |
download | linux-a8753f02eb65acc8490256ae7a632451be68006b.tar.bz2 |
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: Aliaksei Karaliou <akaraliou.dev@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lustre/obdclass/lu_object.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 8e2e6b89e494..2719abbff85f 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -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); /* |