mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
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>
This commit is contained in:
parent
915fd1c2d1
commit
a8753f02eb
@ -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);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user