aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiang Liu <[email protected]>2013-02-22 16:33:56 -0800
committerLinus Torvalds <[email protected]>2013-02-23 17:50:15 -0800
commitc60514b6314137a9505c60966fda2094b22a2fda (patch)
treeb628ce908c641f2ec1566854f24304915352aa9d
parent306f2e9eed173c5b8f3318e36cf92a7df3c3f6d5 (diff)
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 <[email protected]> Cc: Wen Congyang <[email protected]> Cc: David Rientjes <[email protected]> Cc: Jiang Liu <[email protected]> Cc: Maciej Rutecki <[email protected]> Cc: Chris Clayton <[email protected]> Cc: "Rafael J . Wysocki" <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Minchan Kim <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Jianguo Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/memory_hotplug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index a9072a16a160..77a6abfe3291 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++;
}
}