memory_hotplug: clear zone when removing the memory
authorYasuaki Ishimatsu <[email protected]>
Sat, 23 Feb 2013 00:33:12 +0000 (16:33 -0800)
committerLinus Torvalds <[email protected]>
Sun, 24 Feb 2013 01:50:12 +0000 (17:50 -0800)
commit815121d2b5cd56f1757d4468dc3abadd06a0ed6b
tree185b7886cafc50096171e89e0222d0942b5a68d8
parent5fc1d66a22384e7a09c74e4eb4bcb93165fb95f1
memory_hotplug: clear zone when removing the memory

When memory is added, we update zone's and pgdat's start_pfn and
spanned_pages in __add_zone().  So we should revert them when the memory
is removed.

The patch adds a new function __remove_zone() to do this.

Signed-off-by: Yasuaki Ishimatsu <[email protected]>
Signed-off-by: Wen Congyang <[email protected]>
Signed-off-by: Tang Chen <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Jiang Liu <[email protected]>
Cc: Jianguo Wu <[email protected]>
Cc: Kamezawa Hiroyuki <[email protected]>
Cc: Lai Jiangshan <[email protected]>
Cc: Wu Jianguo <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memory_hotplug.c