As suggested by akpm, change the manual initialization of our kmem
index to DEFINE_IDA()
Signed-off-by: Glauber Costa <glommer@parallels.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* 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);
static int memcg_limited_groups_array_size;
/*
* MIN_SIZE is different than 1, because we would like to avoid going through
if (ret)
return ret;
- if (mem_cgroup_is_root(memcg))
- ida_init(&kmem_limited_groups);
-
return mem_cgroup_sockets_init(memcg, ss);
};