]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - mm/page_cgroup.c
swapfile: remove SWP_ACTIVE mask
[mv-sheeva.git] / mm / page_cgroup.c
index 0b3cbf090a674a1424cb1d7cc9e4cd4f3bfa4c02..d6507a660ed64bb1a15129b9336457a616bd9008 100644 (file)
@@ -49,6 +49,9 @@ static int __init alloc_node_page_cgroup(int nid)
        start_pfn = NODE_DATA(nid)->node_start_pfn;
        nr_pages = NODE_DATA(nid)->node_spanned_pages;
 
+       if (!nr_pages)
+               return 0;
+
        table_size = sizeof(struct page_cgroup) * nr_pages;
 
        base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),
@@ -98,7 +101,7 @@ struct page_cgroup *lookup_page_cgroup(struct page *page)
 }
 
 /* __alloc_bootmem...() is protected by !slab_available() */
-int __init_refok init_section_page_cgroup(unsigned long pfn)
+static int __init_refok init_section_page_cgroup(unsigned long pfn)
 {
        struct mem_section *section;
        struct page_cgroup *base, *pc;