[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191018002820.307763-17-guro@fb.com>
Date: Thu, 17 Oct 2019 17:28:20 -0700
From: Roman Gushchin <guro@...com>
To: <linux-mm@...ck.org>
CC: Michal Hocko <mhocko@...nel.org>,
Johannes Weiner <hannes@...xchg.org>,
<linux-kernel@...r.kernel.org>, <kernel-team@...com>,
Shakeel Butt <shakeelb@...gle.com>,
Vladimir Davydov <vdavydov.dev@...il.com>,
Waiman Long <longman@...hat.com>,
Christoph Lameter <cl@...ux.com>, Roman Gushchin <guro@...com>
Subject: [PATCH 16/16] mm: 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@...com>
---
mm/slab_common.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 3dcd90ba7525..1c10c94343f6 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -1105,9 +1105,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.21.0
Powered by blists - more mailing lists