diff options
-rw-r--r-- | mm/page_alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 63835579323a..035300299f94 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -3378,7 +3378,8 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, | |||
3378 | * is used by this zone for memmap. This affects the watermark | 3378 | * is used by this zone for memmap. This affects the watermark |
3379 | * and per-cpu initialisations | 3379 | * and per-cpu initialisations |
3380 | */ | 3380 | */ |
3381 | memmap_pages = (size * sizeof(struct page)) >> PAGE_SHIFT; | 3381 | memmap_pages = |
3382 | PAGE_ALIGN(size * sizeof(struct page)) >> PAGE_SHIFT; | ||
3382 | if (realsize >= memmap_pages) { | 3383 | if (realsize >= memmap_pages) { |
3383 | realsize -= memmap_pages; | 3384 | realsize -= memmap_pages; |
3384 | printk(KERN_DEBUG | 3385 | printk(KERN_DEBUG |