From: Jiang Liu Date: Thu, 7 Feb 2013 01:26:42 +0000 (+1100) Subject: mm: set zone->present_pages to number of existing pages in the zone X-Git-Tag: next-20130218~1^2~405 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=afed2bd42e3199f1834074e37cd9c067ae35df9b;p=karo-tx-linux.git mm: set zone->present_pages to number of existing pages in the zone Now all users of "number of pages managed by the buddy system" have been converted to use zone->managed_pages, so set zone->present_pages to what it should be: present_pages = spanned_pages - absent_pages; Signed-off-by: Jiang Liu Cc: Wen Congyang Cc: David Rientjes Cc: Jiang Liu Cc: Maciej Rutecki Cc: Chris Clayton Cc: "Rafael J . Wysocki" Cc: Mel Gorman Cc: Minchan Kim Cc: KAMEZAWA Hiroyuki Cc: Michal Hocko Cc: Jianguo Wu Signed-off-by: Andrew Morton --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e59760bab13f..79b9fb7ec6ca 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4647,7 +4647,7 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat, nr_all_pages += freesize; zone->spanned_pages = size; - zone->present_pages = freesize; + zone->present_pages = realsize; /* * Set an approximate value for lowmem here, it will be adjusted * when the bootmem allocator frees pages into the buddy system.