mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
memcg: keep root group unchanged if creation fails
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 <[email protected]> Acked-by: Hugh Dickins <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Balbir Singh <[email protected]> Cc: David Rientjes <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
481fe17e97
commit
a41c58a666
1 changed files with 1 additions and 2 deletions
|
|
@ -4907,9 +4907,9 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
|
|||
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);
|
||||
|
|
@ -4948,7 +4948,6 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
|
|||
return &memcg->css;
|
||||
free_out:
|
||||
__mem_cgroup_free(memcg);
|
||||
root_mem_cgroup = NULL;
|
||||
return ERR_PTR(error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue