Message ID | 1343980161-14254-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 68d7123..7d68e0a 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1271,6 +1271,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();