Message ID | 1345455342-27752-20-git-send-email-wency@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 00c050f..e5928c7 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1279,6 +1279,11 @@ int __ref remove_memory(int nid, u64 start, u64 size) /* remove memmap entry */ firmware_map_remove(start, start + size, "System RAM"); + if (!node_present_pages(nid)) { + node_set_offline(nid); + unregister_one_node(nid); + } + arch_remove_memory(start, size); out: unlock_memory_hotplug();