From: Roman Gushchin Date: Fri, 7 Aug 2020 06:21:24 +0000 (-0700) Subject: mm: memcg/slab: remove redundant check in memcg_accumulate_slabinfo() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=15999eef7f25e2ea6a1c33f026166f472c5714e9;p=linux.git mm: memcg/slab: remove redundant check in memcg_accumulate_slabinfo() memcg_accumulate_slabinfo() is never called with a non-root kmem_cache as a first argument, so the is_root_cache(s) check is redundant and can be removed without any functional change. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-17-guro@fb.com Signed-off-by: Linus Torvalds --- diff --git a/mm/slab_common.c b/mm/slab_common.c index a9f6ab452ce53..ad67a03c592ab 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1104,9 +1104,6 @@ memcg_accumulate_slabinfo(struct kmem_cache *s, struct slabinfo *info) struct kmem_cache *c; struct slabinfo sinfo; - if (!is_root_cache(s)) - return; - c = memcg_cache(s); if (c) { memset(&sinfo, 0, sizeof(sinfo));