[077/163] mm: memcg/slab: remove redundant check in memcg_accumulate_slabinfo()
diff mbox series

Message ID 20200807062124.HxrApR2M-%akpm@linux-foundation.org
State New
Headers show
Series
  • [001/163] mm/memory.c: avoid access flag update TLB flush for retried page fault
Related show

Commit Message

Andrew Morton Aug. 7, 2020, 6:21 a.m. UTC
From: Roman Gushchin <guro@fb.com>
Subject: 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.

Link: http://lkml.kernel.org/r/20200623174037.3951353-17-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/slab_common.c |    3 ---
 1 file changed, 3 deletions(-)

Patch
diff mbox series

--- a/mm/slab_common.c~mm-memcg-slab-remove-redundant-check-in-memcg_accumulate_slabinfo
+++ a/mm/slab_common.c
@@ -1104,9 +1104,6 @@  memcg_accumulate_slabinfo(struct kmem_ca
 	struct kmem_cache *c;
 	struct slabinfo sinfo;
 
-	if (!is_root_cache(s))
-		return;
-
 	c = memcg_cache(s);
 	if (c) {
 		memset(&sinfo, 0, sizeof(sinfo));