mm: create non-atomic version of SetPageReserved for init use
[muen/linux.git] / mm / page_alloc.c
index eb6c50cc8880d962be70b28660df3e3a8b9b2d08..cee1abf85d720f99ff79e027ac904523998a24d8 100644 (file)
@@ -1232,7 +1232,12 @@ void __meminit reserve_bootmem_region(phys_addr_t start, phys_addr_t end)
                        /* Avoid false-positive PageTail() */
                        INIT_LIST_HEAD(&page->lru);
 
-                       SetPageReserved(page);
+                       /*
+                        * no need for atomic set_bit because the struct
+                        * page is not visible yet so nobody should
+                        * access it yet.
+                        */
+                       __SetPageReserved(page);
                }
        }
 }
@@ -5508,7 +5513,7 @@ not_early:
                page = pfn_to_page(pfn);
                __init_single_page(page, pfn, zone, nid);
                if (context == MEMMAP_HOTPLUG)
-                       SetPageReserved(page);
+                       __SetPageReserved(page);
 
                /*
                 * Mark the block movable so that blocks are reserved for