vmscan: fix it to take care of nodemask
[safe/jmp/linux-2.6] / mm / page_cgroup.c
index 74ae8e0..ceecfbb 100644 (file)
@@ -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)  {
@@ -114,7 +114,8 @@ static int __init_refok init_section_page_cgroup(unsigned long pfn)
                nid = page_to_nid(pfn_to_page(pfn));
                table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION;
                if (slab_is_available()) {
-                       base = kmalloc_node(table_size, GFP_KERNEL, nid);
+                       base = kmalloc_node(table_size,
+                                       GFP_KERNEL | __GFP_NOWARN, nid);
                        if (!base)
                                base = vmalloc_node(table_size, nid);
                } else {
@@ -247,7 +248,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) {