From: KAMEZAWA Hiroyuki Date: Tue, 25 Jan 2011 23:07:28 +0000 (-0800) Subject: memcg: bugfix check mem_cgroup_disabled() at split fixup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d37c4a9199920964ffdfaec6335d93b9dcf9ca5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git memcg: bugfix check mem_cgroup_disabled() at split fixup mem_cgroup_disabled() should be checked at splitting. If disabled, no heavy work is necesary. Signed-off-by: KAMEZAWA Hiroyuki Acked-by: Daisuke Nishimura Reviewed-by: Johannes Weiner Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 1eb1a04f874c..8ab1d42664fb 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2145,6 +2145,8 @@ void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail) struct page_cgroup *tail_pc = lookup_page_cgroup(tail); unsigned long flags; + if (mem_cgroup_disabled()) + return; /* * We have no races with charge/uncharge but will have races with * page state accounting.