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 <bigeasy@linutronix.de> Acked-by: Michal Hocko <mhocko@suse.com> Cc: linux-mm@kvack.org Cc: rt@linutronix.de Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Vlastimil Babka <vbabka@suse.cz> Link: http://lkml.kernel.org/r/20161126231350.10321-8-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
b32614c034
commit
76f290935b
|
@ -1722,24 +1722,19 @@ static void __init init_cpu_node_state(void)
|
||||||
{
|
{
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
get_online_cpus();
|
|
||||||
for_each_online_cpu(cpu)
|
for_each_online_cpu(cpu)
|
||||||
node_set_state(cpu_to_node(cpu), N_CPU);
|
node_set_state(cpu_to_node(cpu), N_CPU);
|
||||||
put_online_cpus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vmstat_cpu_dead(int node)
|
static void vmstat_cpu_dead(int node)
|
||||||
{
|
{
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
get_online_cpus();
|
|
||||||
for_each_online_cpu(cpu)
|
for_each_online_cpu(cpu)
|
||||||
if (cpu_to_node(cpu) == node)
|
if (cpu_to_node(cpu) == node)
|
||||||
goto end;
|
return;
|
||||||
|
|
||||||
node_clear_state(node, N_CPU);
|
node_clear_state(node, N_CPU);
|
||||||
end:
|
|
||||||
put_online_cpus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue