diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2016-11-27 00:13:35 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-12-02 00:52:35 +0100 |
commit | 76f290935b1a395ee6c9a14697f16593591d1fe8 (patch) | |
tree | 53802f66d64f5ff31f69df029ed05c579e9ac43d /mm/vmstat.c | |
parent | b32614c03413f8a6025d8677c2b7c0ee976e63d4 (diff) | |
download | linux-76f290935b1a395ee6c9a14697f16593591d1fe8.tar.bz2 |
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>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r-- | mm/vmstat.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 604f26a4f696..0b63ffb5c407 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -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(); } /* |