If memcg_kmem_online() is false, only non-slab shrinkers are recorded in the map, so remove the check. Signed-off-by: Haifeng Xu --- mm/shrinker.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mm/shrinker.c b/mm/shrinker.c index 68ea2d49495c..436387b3ba24 100644 --- a/mm/shrinker.c +++ b/mm/shrinker.c @@ -638,11 +638,6 @@ static unsigned long shrink_slab_memcg(gfp_t gfp_mask, int nid, } rcu_read_unlock(); - /* Call non-slab shrinkers even though kmem is disabled */ - if (!memcg_kmem_online() && - !(shrinker->flags & SHRINKER_NONSLAB)) - continue; - ret = do_shrink_slab(&sc, shrinker, priority); if (ret == SHRINK_EMPTY) { clear_bit(offset, unit->map); -- 2.43.0