From: Jiang Liu Date: Sat, 23 Feb 2013 00:33:56 +0000 (-0800) Subject: mm: increase totalram_pages when free pages allocated by bootmem allocator X-Git-Tag: v3.9-rc1~99^2~89 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c60514b6314137a9505c60966fda2094b22a2fda;p=~emulex%2Finfiniband.git mm: increase totalram_pages when free pages allocated by bootmem allocator Function put_page_bootmem() is used to free pages allocated by bootmem allocator, so it should increase totalram_pages when freeing pages into the buddy system. 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/memory_hotplug.c b/mm/memory_hotplug.c index a9072a16a16..77a6abfe329 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -124,6 +124,7 @@ void __ref put_page_bootmem(struct page *page) mutex_lock(&ppb_lock); __free_pages_bootmem(page, 0); mutex_unlock(&ppb_lock); + totalram_pages++; } }