lkml.org 
[lkml]   [2020]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v7 16/19] mm: memcg/slab: remove redundant check in memcg_accumulate_slabinfo()
Date
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>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
---
mm/slab_common.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/mm/slab_common.c b/mm/slab_common.c
index 0618d3595c08..e546778030a2 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -1087,9 +1087,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));
--
2.26.2
\
 
 \ /
  Last update: 2020-06-23 19:42    [W:0.139 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site