drivers: lustre: obdclass: simplify unregister_shrinker() usage
Dilger
PATCH 1/1 drivers: lustre: obdclass: simplify unregister_shrinker() usage
In reply to a message not in the archiveQuoted 7 lines · Aliaksei Karaliou
lu_global_fini()explicitly uses knowledge about shrinker's internals to make decision about calling ofunregister_shrinker(). Now this check was integrated intounregister_shrinker(), so it is safe to call it against unregistered shrinker.Signed-off-by Aliaksei Karaliou <[email protected]>
Reviewed-by Andreas Dilger <[email protected]>
Quoted 21 lines
---
drivers/staging/lustre/lustre/obdclass/lu_object.c| 3 +--1 file changed, 1 insertion(+), 2 deletions(-)drivers/staging/lustre/lustre/obdclass/lu_object.c +1
-2@@ -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);/* Signature · 1 line
2.11.0
Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation