|
|
@@ -2373,6 +2373,12 @@ static void __split_huge_page_tail(struct page *head, int tail,
|
|
|
(1L << PG_unevictable) |
|
|
|
(1L << PG_dirty)));
|
|
|
|
|
|
+ /* ->mapping in first tail page is compound_mapcount */
|
|
|
+ VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING,
|
|
|
+ page_tail);
|
|
|
+ page_tail->mapping = head->mapping;
|
|
|
+ page_tail->index = head->index + tail;
|
|
|
+
|
|
|
/* Page flags must be visible before we make the page non-compound. */
|
|
|
smp_wmb();
|
|
|
|
|
|
@@ -2393,12 +2399,6 @@ static void __split_huge_page_tail(struct page *head, int tail,
|
|
|
if (page_is_idle(head))
|
|
|
set_page_idle(page_tail);
|
|
|
|
|
|
- /* ->mapping in first tail page is compound_mapcount */
|
|
|
- VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING,
|
|
|
- page_tail);
|
|
|
- page_tail->mapping = head->mapping;
|
|
|
-
|
|
|
- page_tail->index = head->index + tail;
|
|
|
page_cpupid_xchg_last(page_tail, page_cpupid_last(head));
|
|
|
|
|
|
/*
|