[PATCH] mm: memcontrol: fix cgroup creation failure after many small jobs fix
From: Johannes Weiner
Date: Tue Jun 21 2016 - 11:36:13 EST
init the IDR
Reported-by: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx>
Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index dc92b2df2585..b0de1342eab2 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4081,7 +4081,7 @@ static struct cftype mem_cgroup_legacy_files[] = {
* those references are manageable from userspace.
*/
-static struct idr mem_cgroup_idr;
+static DEFINE_IDR(mem_cgroup_idr);
static void mem_cgroup_id_get(struct mem_cgroup *memcg)
{
--
2.8.3