diff options
author | Pekka Enberg <penberg@kernel.org> | 2012-01-11 21:11:29 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-01-11 21:11:29 +0200 |
commit | 5878cf431ca7233a56819ca6970153ac0b129599 (patch) | |
tree | e5d21d04a0b468d2dabbe3a3824f23b5537fc6a7 /mm/page_alloc.c | |
parent | 74ee4ef1f901fbb014bdcdc9171d126490ce2b62 (diff) | |
parent | b13683d1cc14d1dd30b8e20f3ebea3f814ad029f (diff) | |
download | linux-stable-5878cf431ca7233a56819ca6970153ac0b129599.tar.gz linux-stable-5878cf431ca7233a56819ca6970153ac0b129599.tar.bz2 linux-stable-5878cf431ca7233a56819ca6970153ac0b129599.zip |
Merge branch 'slab/urgent' into slab/for-linus
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 9dd443d89d8b..2b8ba3aebf6e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -356,8 +356,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; } } @@ -3377,9 +3377,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; |