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>
This commit is contained in:
committed by
Linus Torvalds
parent
08e552c69c
commit
f8d6654226
@@ -74,7 +74,7 @@ void __init page_cgroup_init(void)
|
||||
|
||||
int nid, fail;
|
||||
|
||||
if (mem_cgroup_subsys.disabled)
|
||||
if (mem_cgroup_disabled())
|
||||
return;
|
||||
|
||||
for_each_online_node(nid) {
|
||||
@@ -247,7 +247,7 @@ void __init page_cgroup_init(void)
|
||||
unsigned long pfn;
|
||||
int fail = 0;
|
||||
|
||||
if (mem_cgroup_subsys.disabled)
|
||||
if (mem_cgroup_disabled())
|
||||
return;
|
||||
|
||||
for (pfn = 0; !fail && pfn < max_pfn; pfn += PAGES_PER_SECTION) {
|
||||
|
Reference in New Issue
Block a user