diff options
Diffstat (limited to 'mm/page_alloc.c')
| -rw-r--r-- | mm/page_alloc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 60663232fbb2..0541288ebf4b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -114,7 +114,8 @@ static void bad_page(const char *function, struct page *page) | |||
| 114 | 1 << PG_reclaim | | 114 | 1 << PG_reclaim | |
| 115 | 1 << PG_slab | | 115 | 1 << PG_slab | |
| 116 | 1 << PG_swapcache | | 116 | 1 << PG_swapcache | |
| 117 | 1 << PG_writeback); | 117 | 1 << PG_writeback | |
| 118 | 1 << PG_reserved ); | ||
| 118 | set_page_count(page, 0); | 119 | set_page_count(page, 0); |
| 119 | reset_page_mapcount(page); | 120 | reset_page_mapcount(page); |
| 120 | page->mapping = NULL; | 121 | page->mapping = NULL; |
| @@ -244,7 +245,6 @@ static inline int page_is_buddy(struct page *page, int order) | |||
| 244 | { | 245 | { |
| 245 | if (PagePrivate(page) && | 246 | if (PagePrivate(page) && |
| 246 | (page_order(page) == order) && | 247 | (page_order(page) == order) && |
| 247 | !PageReserved(page) && | ||
| 248 | page_count(page) == 0) | 248 | page_count(page) == 0) |
| 249 | return 1; | 249 | return 1; |
| 250 | return 0; | 250 | return 0; |
| @@ -327,7 +327,8 @@ static inline void free_pages_check(const char *function, struct page *page) | |||
| 327 | 1 << PG_reclaim | | 327 | 1 << PG_reclaim | |
| 328 | 1 << PG_slab | | 328 | 1 << PG_slab | |
| 329 | 1 << PG_swapcache | | 329 | 1 << PG_swapcache | |
| 330 | 1 << PG_writeback ))) | 330 | 1 << PG_writeback | |
| 331 | 1 << PG_reserved ))) | ||
| 331 | bad_page(function, page); | 332 | bad_page(function, page); |
| 332 | if (PageDirty(page)) | 333 | if (PageDirty(page)) |
| 333 | __ClearPageDirty(page); | 334 | __ClearPageDirty(page); |
| @@ -455,7 +456,8 @@ static void prep_new_page(struct page *page, int order) | |||
| 455 | 1 << PG_reclaim | | 456 | 1 << PG_reclaim | |
| 456 | 1 << PG_slab | | 457 | 1 << PG_slab | |
| 457 | 1 << PG_swapcache | | 458 | 1 << PG_swapcache | |
| 458 | 1 << PG_writeback ))) | 459 | 1 << PG_writeback | |
| 460 | 1 << PG_reserved ))) | ||
| 459 | bad_page(__FUNCTION__, page); | 461 | bad_page(__FUNCTION__, page); |
| 460 | 462 | ||
| 461 | page->flags &= ~(1 << PG_uptodate | 1 << PG_error | | 463 | page->flags &= ~(1 << PG_uptodate | 1 << PG_error | |
| @@ -1016,7 +1018,7 @@ void __pagevec_free(struct pagevec *pvec) | |||
| 1016 | 1018 | ||
| 1017 | fastcall void __free_pages(struct page *page, unsigned int order) | 1019 | fastcall void __free_pages(struct page *page, unsigned int order) |
| 1018 | { | 1020 | { |
| 1019 | if (!PageReserved(page) && put_page_testzero(page)) { | 1021 | if (put_page_testzero(page)) { |
| 1020 | if (order == 0) | 1022 | if (order == 0) |
| 1021 | free_hot_page(page); | 1023 | free_hot_page(page); |
| 1022 | else | 1024 | else |
| @@ -1674,7 +1676,7 @@ void __init memmap_init_zone(unsigned long size, int nid, unsigned long zone, | |||
| 1674 | continue; | 1676 | continue; |
| 1675 | page = pfn_to_page(pfn); | 1677 | page = pfn_to_page(pfn); |
| 1676 | set_page_links(page, zone, nid, pfn); | 1678 | set_page_links(page, zone, nid, pfn); |
| 1677 | set_page_count(page, 0); | 1679 | set_page_count(page, 1); |
| 1678 | reset_page_mapcount(page); | 1680 | reset_page_mapcount(page); |
| 1679 | SetPageReserved(page); | 1681 | SetPageReserved(page); |
| 1680 | INIT_LIST_HEAD(&page->lru); | 1682 | INIT_LIST_HEAD(&page->lru); |
