summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/page_alloc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 94e64784a8be..94fb4370e000 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5160,10 +5160,8 @@ static int __build_all_zonelists(void *data)
build_zonelists(pgdat);
}
- }
#ifdef CONFIG_HAVE_MEMORYLESS_NODES
- for_each_possible_cpu(cpu) {
/*
* We now know the "local memory node" for each node--
* i.e., the node of the first zone in the generic zonelist.
@@ -5172,10 +5170,10 @@ static int __build_all_zonelists(void *data)
* secondary cpus' numa_mem as they come on-line. During
* node/memory hotplug, we'll fixup all on-line cpus.
*/
- if (cpu_online(cpu))
+ for_each_online_cpu(cpu)
set_cpu_numa_mem(cpu, local_memory_node(cpu_to_node(cpu)));
- }
#endif
+ }
return 0;
}
OpenPOWER on IntegriCloud