diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory_hotplug.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 9fab10795bea..65842d688b7c 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -1092,6 +1092,10 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start) | |||
1092 | return NULL; | 1092 | return NULL; |
1093 | 1093 | ||
1094 | arch_refresh_nodedata(nid, pgdat); | 1094 | arch_refresh_nodedata(nid, pgdat); |
1095 | } else { | ||
1096 | /* Reset the nr_zones and classzone_idx to 0 before reuse */ | ||
1097 | pgdat->nr_zones = 0; | ||
1098 | pgdat->classzone_idx = 0; | ||
1095 | } | 1099 | } |
1096 | 1100 | ||
1097 | /* we can use NODE_DATA(nid) from here */ | 1101 | /* we can use NODE_DATA(nid) from here */ |
@@ -1977,15 +1981,6 @@ void try_offline_node(int nid) | |||
1977 | if (is_vmalloc_addr(zone->wait_table)) | 1981 | if (is_vmalloc_addr(zone->wait_table)) |
1978 | vfree(zone->wait_table); | 1982 | vfree(zone->wait_table); |
1979 | } | 1983 | } |
1980 | |||
1981 | /* | ||
1982 | * Since there is no way to guarentee the address of pgdat/zone is not | ||
1983 | * on stack of any kernel threads or used by other kernel objects | ||
1984 | * without reference counting or other symchronizing method, do not | ||
1985 | * reset node_data and free pgdat here. Just reset it to 0 and reuse | ||
1986 | * the memory when the node is online again. | ||
1987 | */ | ||
1988 | memset(pgdat, 0, sizeof(*pgdat)); | ||
1989 | } | 1984 | } |
1990 | EXPORT_SYMBOL(try_offline_node); | 1985 | EXPORT_SYMBOL(try_offline_node); |
1991 | 1986 | ||