Skip to content

Commit 15999ee

Browse files
rgushchintorvalds
authored andcommitted
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 <guro@fb.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Shakeel Butt <shakeelb@google.com> Cc: Christoph Lameter <cl@linux.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/20200623174037.3951353-17-guro@fb.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent c709440 commit 15999ee

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

mm/slab_common.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,9 +1104,6 @@ memcg_accumulate_slabinfo(struct kmem_cache *s, struct slabinfo *info)
11041104
struct kmem_cache *c;
11051105
struct slabinfo sinfo;
11061106

1107-
if (!is_root_cache(s))
1108-
return;
1109-
11101107
c = memcg_cache(s);
11111108
if (c) {
11121109
memset(&sinfo, 0, sizeof(sinfo));

0 commit comments

Comments
 (0)