summaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2011-01-26 00:07:28 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-26 01:50:03 +0100
commit3d37c4a9199920964ffdfaec6335d93b9dcf9ca5 (patch)
treeee37989687d869817aa870a7fb4c405b7907c030 /mm/memcontrol.c
parentmemcg: fix account leak at failure of memsw acconting (diff)
downloadlinux-3d37c4a9199920964ffdfaec6335d93b9dcf9ca5.tar.xz
linux-3d37c4a9199920964ffdfaec6335d93b9dcf9ca5.zip
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 <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Reviewed-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c2
1 files changed, 2 insertions, 0 deletions
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.