X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=mm%2Fmemory_hotplug.c;h=41266dc29f33fb1278d7e4e9d6fd2efab69380a1;hb=1b49dae1ca65cd38221b28911ba08954627a2760;hp=3894b65b155555f11076f0cae90f71e2475b6929;hpb=84bd8d33a9604256ce0d86ca6d035295e874fa99;p=cascardo%2Flinux.git diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 3894b65b1555..41266dc29f33 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -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.*/ 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 @@ -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) { arch_refresh_nodedata(nid, NULL); + free_percpu(pgdat->per_cpu_nodestats); arch_free_nodedata(pgdat); return; }