Re: [PATCH] mm: memcg: keep root group unchanged if fail to create new
From: Hillf Danton
Date: Mon Dec 12 2011 - 08:49:19 EST
On Mon, Dec 12, 2011 at 9:11 PM, Michal Hocko <mhocko@xxxxxxx> wrote:
>
> Hillf could you update the patch please?
>
Hi Michal,
Please review again, thanks.
Hillf
===CUT HERE===
From: Hillf Danton <dhillf@xxxxxxxxx>
Subject: [PATCH] mm: memcg: keep root group unchanged if fail to create new
If the request is to create non-root group and we fail to meet it, we should
leave the root unchanged.
Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
Acked-by: Hugh Dickins <hughd@xxxxxxxxxx>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
---
--- a/mm/memcontrol.c Fri Dec 9 21:57:40 2011
+++ b/mm/memcontrol.c Mon Dec 12 21:47:14 2011
@@ -4848,9 +4848,9 @@ mem_cgroup_create(struct cgroup_subsys *
int cpu;
enable_swap_cgroup();
parent = NULL;
- root_mem_cgroup = memcg;
if (mem_cgroup_soft_limit_tree_init())
goto free_out;
+ root_mem_cgroup = memcg;
for_each_possible_cpu(cpu) {
struct memcg_stock_pcp *stock =
&per_cpu(memcg_stock, cpu);
@@ -4888,7 +4888,6 @@ mem_cgroup_create(struct cgroup_subsys *
return &memcg->css;
free_out:
__mem_cgroup_free(memcg);
- root_mem_cgroup = NULL;
return ERR_PTR(error);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/