|
@@ -1092,6 +1092,10 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
arch_refresh_nodedata(nid, pgdat);
|
|
arch_refresh_nodedata(nid, pgdat);
|
|
|
|
+ } else {
|
|
|
|
+ /* Reset the nr_zones and classzone_idx to 0 before reuse */
|
|
|
|
+ pgdat->nr_zones = 0;
|
|
|
|
+ pgdat->classzone_idx = 0;
|
|
}
|
|
}
|
|
|
|
|
|
/* we can use NODE_DATA(nid) from here */
|
|
/* we can use NODE_DATA(nid) from here */
|
|
@@ -1977,15 +1981,6 @@ void try_offline_node(int nid)
|
|
if (is_vmalloc_addr(zone->wait_table))
|
|
if (is_vmalloc_addr(zone->wait_table))
|
|
vfree(zone->wait_table);
|
|
vfree(zone->wait_table);
|
|
}
|
|
}
|
|
-
|
|
|
|
- /*
|
|
|
|
- * Since there is no way to guarentee the address of pgdat/zone is not
|
|
|
|
- * on stack of any kernel threads or used by other kernel objects
|
|
|
|
- * without reference counting or other symchronizing method, do not
|
|
|
|
- * reset node_data and free pgdat here. Just reset it to 0 and reuse
|
|
|
|
- * the memory when the node is online again.
|
|
|
|
- */
|
|
|
|
- memset(pgdat, 0, sizeof(*pgdat));
|
|
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(try_offline_node);
|
|
EXPORT_SYMBOL(try_offline_node);
|
|
|
|
|