|
@@ -1219,6 +1219,7 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
|
|
|
|
|
|
|
|
/* init node's zones as empty zones, we don't have any present pages.*/
|
|
/* init node's zones as empty zones, we don't have any present pages.*/
|
|
|
free_area_init_node(nid, zones_size, start_pfn, zholes_size);
|
|
free_area_init_node(nid, zones_size, start_pfn, zholes_size);
|
|
|
|
|
+ pgdat->per_cpu_nodestats = alloc_percpu(struct per_cpu_nodestat);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* The node we allocated has no zone fallback lists. For avoiding
|
|
* The node we allocated has no zone fallback lists. For avoiding
|
|
@@ -1249,6 +1250,7 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
|
|
|
static void rollback_node_hotadd(int nid, pg_data_t *pgdat)
|
|
static void rollback_node_hotadd(int nid, pg_data_t *pgdat)
|
|
|
{
|
|
{
|
|
|
arch_refresh_nodedata(nid, NULL);
|
|
arch_refresh_nodedata(nid, NULL);
|
|
|
|
|
+ free_percpu(pgdat->per_cpu_nodestats);
|
|
|
arch_free_nodedata(pgdat);
|
|
arch_free_nodedata(pgdat);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|