Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423342Ab2KNSyx (ORCPT ); Wed, 14 Nov 2012 13:54:53 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:43176 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423237Ab2KNSyp (ORCPT ); Wed, 14 Nov 2012 13:54:45 -0500 From: Glauber Costa To: Andrew Morton Cc: , , Tejun Heo , Michal Hocko , Johannes Weiner , , Christoph Lameter , Pekka Enberg , Glauber Costa Subject: [PATCH 1/7] memcg: simplify ida initialization Date: Thu, 15 Nov 2012 06:54:47 +0400 Message-Id: <1352948093-2315-2-git-send-email-glommer@parallels.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1352948093-2315-1-git-send-email-glommer@parallels.com> References: <1352948093-2315-1-git-send-email-glommer@parallels.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1325 Lines: 43 As suggested by akpm, change the manual initialization of our kmem index to DEFINE_IDA() Signed-off-by: Glauber Costa CC: Michal Hocko CC: Kamezawa Hiroyuki CC: Johannes Weiner CC: Andrew Morton --- mm/memcontrol.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6136fec..c0c6adf 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -569,7 +569,7 @@ static void disarm_sock_keys(struct mem_cgroup *memcg) * memcg_limited_groups_array_size. It will double each time we have to * increase it. */ -static struct ida kmem_limited_groups; +static DEFINE_IDA(kmem_limited_groups); int memcg_limited_groups_array_size; /* @@ -5686,9 +5686,6 @@ static int memcg_init_kmem(struct mem_cgroup *memcg, struct cgroup_subsys *ss) if (ret) return ret; - if (mem_cgroup_is_root(memcg)) - ida_init(&kmem_limited_groups); - return mem_cgroup_sockets_init(memcg, ss); }; -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/