From: Jiang Liu Date: Thu, 7 Feb 2013 01:26:42 +0000 (+1100) Subject: mm: increase totalram_pages when free pages allocated by bootmem allocator X-Git-Tag: next-20130218~1^2~404 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a65572ff6eb78ff893cd9e793b2ddfe6c1c71f54;p=karo-tx-linux.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 --- diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 0653b97988fc..e675cc5357d9 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++; } }