mm/vmstat: Drop get_online_cpus() from init_cpu_node_state/vmstat_cpu_dead()

Both functions are called with protection against cpu hotplug already so
*_online_cpus() could be dropped.

Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Johannes Weiner <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
Sebastian Andrzej Siewior 2016-11-27 00:13:35 +01:00 • committed by Thomas Gleixner
commit 76f290935b

View file

@ -1722,24 +1722,19 @@ static void __init init_cpu_node_state(void)
{
int cpu;
get_online_cpus();
for_each_online_cpu(cpu)
node_set_state(cpu_to_node(cpu), N_CPU);
put_online_cpus();
}
static void vmstat_cpu_dead(int node)
{
int cpu;
get_online_cpus();
for_each_online_cpu(cpu)
if (cpu_to_node(cpu) == node)
goto end;
return;
node_clear_state(node, N_CPU);
end:
put_online_cpus();
}
/*