diff mbox series

[v2,25/28] mm: memcg/slab: remove redundant check in memcg_accumulate_slabinfo()

Message ID 20200127173453.2089565-26-guro@fb.com (mailing list archive)
State New, archived
Headers show
Series The new cgroup slab memory controller | expand

Commit Message

Roman Gushchin Jan. 27, 2020, 5:34 p.m. UTC
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>
---
 mm/slab_common.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/mm/slab_common.c b/mm/slab_common.c
index 4c54120c4171..df6683cd20cc 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -1086,9 +1086,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));