aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_cgroup.c
diff options
context:
space:
mode:
authorHirokazu Takahashi <taka@valinux.co.jp>2009-01-07 21:08:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 11:31:05 -0500
commitf8d665422603ee1b8ed04dcad4242f14d623c941 (patch)
treed872a12113998ed99ce22247091c481b9f465faa /mm/page_cgroup.c
parent08e552c69c6930d64722de3ec18c51844d06ee28 (diff)
memcg: add mem_cgroup_disabled()
We check mem_cgroup is disabled or not by checking mem_cgroup_subsys.disabled. I think it has more references than expected, now. replacing if (mem_cgroup_subsys.disabled) with if (mem_cgroup_disabled()) give us good look, I think. [kamezawa.hiroyu@jp.fujitsu.com: fix typo] Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_cgroup.c')
-rw-r--r--mm/page_cgroup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 74ae8e01d071..7006a11350c8 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -74,7 +74,7 @@ void __init page_cgroup_init(void)
74 74
75 int nid, fail; 75 int nid, fail;
76 76
77 if (mem_cgroup_subsys.disabled) 77 if (mem_cgroup_disabled())
78 return; 78 return;
79 79
80 for_each_online_node(nid) { 80 for_each_online_node(nid) {
@@ -247,7 +247,7 @@ void __init page_cgroup_init(void)
247 unsigned long pfn; 247 unsigned long pfn;
248 int fail = 0; 248 int fail = 0;
249 249
250 if (mem_cgroup_subsys.disabled) 250 if (mem_cgroup_disabled())
251 return; 251 return;
252 252
253 for (pfn = 0; !fail && pfn < max_pfn; pfn += PAGES_PER_SECTION) { 253 for (pfn = 0; !fail && pfn < max_pfn; pfn += PAGES_PER_SECTION) {