diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2012-01-05 10:05:34 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-01-05 10:05:50 +0530 |
commit | 18b3e7967257168128dc3a16906de2880985ef6c (patch) | |
tree | d6efcb27791457c49fee449fb68e63e5a39a56d7 /mm/page_alloc.c | |
parent | 790716386f61bb982a3e47f4f7fc934dcfdcd511 (diff) | |
parent | 55cc81a8a48f6f78a5e1e164d179dd043f80cb5f (diff) |
Linux 3.1.7
Change-Id: I99507d7cfdcee064f808856dc2ce99d806fd864f
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 75cd8d74a1a5..8859578e4bdc 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -370,8 +370,8 @@ void prep_compound_page(struct page *page, unsigned long order) __SetPageHead(page); for (i = 1; i < nr_pages; i++) { struct page *p = page + i; - __SetPageTail(p); + set_page_count(p, 0); p->first_page = page; } } @@ -3393,9 +3393,15 @@ static void setup_zone_migrate_reserve(struct zone *zone) unsigned long block_migratetype; int reserve; - /* Get the start pfn, end pfn and the number of blocks to reserve */ + /* + * Get the start pfn, end pfn and the number of blocks to reserve + * We have to be careful to be aligned to pageblock_nr_pages to + * make sure that we always check pfn_valid for the first page in + * the block. + */ start_pfn = zone->zone_start_pfn; end_pfn = start_pfn + zone->spanned_pages; + start_pfn = roundup(start_pfn, pageblock_nr_pages); reserve = roundup(min_wmark_pages(zone), pageblock_nr_pages) >> pageblock_order; |