Commit 2dda81ca authored by Li Zefan's avatar Li Zefan Committed by Linus Torvalds

memcgroup: return negative error code in mem_cgroup_create()

Cgroup requires the subsystem to return negative error code on error in the
create method.
Signed-off-by: default avatarLi Zefan <>
Acked-by: default avatarKAMEZAWA Hiroyuki <>
Acked-by: default avatarBalbir Singh <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 7fde4c3e
......@@ -1100,7 +1100,7 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
mem = kzalloc(sizeof(struct mem_cgroup), GFP_KERNEL);
if (mem == NULL)
return NULL;
return ERR_PTR(-ENOMEM);
......@@ -1116,7 +1116,7 @@ free_out:
free_mem_cgroup_per_zone_info(mem, node);
if (cont->parent != NULL)
return NULL;
return ERR_PTR(-ENOMEM);
static void mem_cgroup_pre_destroy(struct cgroup_subsys *ss,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment