From: Jiang Liu Date: Sat, 23 Feb 2013 00:33:54 +0000 (-0800) Subject: mm: set zone->present_pages to number of existing pages in the zone X-Git-Tag: v3.9-rc1~99^2~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=306f2e9eed173c5b8f3318e36cf92a7df3c3f6d5;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.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 Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5f73106..07fe78d 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4650,7 +4650,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.