|
@@ -917,7 +917,6 @@ static void prep_compound_gigantic_page(struct page *page, unsigned long order)
|
|
__SetPageHead(page);
|
|
__SetPageHead(page);
|
|
__ClearPageReserved(page);
|
|
__ClearPageReserved(page);
|
|
for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
|
|
for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) {
|
|
- __SetPageTail(p);
|
|
|
|
/*
|
|
/*
|
|
* For gigantic hugepages allocated through bootmem at
|
|
* For gigantic hugepages allocated through bootmem at
|
|
* boot, it's safer to be consistent with the not-gigantic
|
|
* boot, it's safer to be consistent with the not-gigantic
|
|
@@ -933,6 +932,9 @@ static void prep_compound_gigantic_page(struct page *page, unsigned long order)
|
|
__ClearPageReserved(p);
|
|
__ClearPageReserved(p);
|
|
set_page_count(p, 0);
|
|
set_page_count(p, 0);
|
|
p->first_page = page;
|
|
p->first_page = page;
|
|
|
|
+ /* Make sure p->first_page is always valid for PageTail() */
|
|
|
|
+ smp_wmb();
|
|
|
|
+ __SetPageTail(p);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|