diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2437a7e17aba..1481439ee2e4 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -780,11 +780,7 @@ void __init init_cma_reserved_pageblock(struct page *page) | |||
780 | set_page_refcounted(page); | 780 | set_page_refcounted(page); |
781 | set_pageblock_migratetype(page, MIGRATE_CMA); | 781 | set_pageblock_migratetype(page, MIGRATE_CMA); |
782 | __free_pages(page, pageblock_order); | 782 | __free_pages(page, pageblock_order); |
783 | totalram_pages += pageblock_nr_pages; | 783 | adjust_managed_page_count(page, pageblock_nr_pages); |
784 | #ifdef CONFIG_HIGHMEM | ||
785 | if (PageHighMem(page)) | ||
786 | totalhigh_pages += pageblock_nr_pages; | ||
787 | #endif | ||
788 | } | 784 | } |
789 | #endif | 785 | #endif |
790 | 786 | ||
@@ -5207,8 +5203,13 @@ void adjust_managed_page_count(struct page *page, long count) | |||
5207 | spin_lock(&managed_page_count_lock); | 5203 | spin_lock(&managed_page_count_lock); |
5208 | page_zone(page)->managed_pages += count; | 5204 | page_zone(page)->managed_pages += count; |
5209 | totalram_pages += count; | 5205 | totalram_pages += count; |
5206 | #ifdef CONFIG_HIGHMEM | ||
5207 | if (PageHighMem(page)) | ||
5208 | totalhigh_pages += count; | ||
5209 | #endif | ||
5210 | spin_unlock(&managed_page_count_lock); | 5210 | spin_unlock(&managed_page_count_lock); |
5211 | } | 5211 | } |
5212 | EXPORT_SYMBOL(adjust_managed_page_count); | ||
5212 | 5213 | ||
5213 | unsigned long free_reserved_area(void *start, void *end, int poison, char *s) | 5214 | unsigned long free_reserved_area(void *start, void *end, int poison, char *s) |
5214 | { | 5215 | { |