From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758311AbcLBALu (ORCPT ); Thu, 1 Dec 2016 19:11:50 -0500 Received: from terminus.zytor.com ([198.137.202.10]:55672 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758232AbcLBALr (ORCPT ); Thu, 1 Dec 2016 19:11:47 -0500 Date: Thu, 1 Dec 2016 16:10:58 -0800 From: tip-bot for Sebastian Andrzej Siewior Message-ID: Cc: tglx@linutronix.de, vbabka@suse.cz, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hannes@cmpxchg.org, mhocko@suse.com, akpm@linux-foundation.org, bigeasy@linutronix.de, mgorman@techsingularity.net Reply-To: akpm@linux-foundation.org, mhocko@suse.com, mgorman@techsingularity.net, bigeasy@linutronix.de, linux-kernel@vger.kernel.org, hannes@cmpxchg.org, hpa@zytor.com, tglx@linutronix.de, vbabka@suse.cz, mingo@kernel.org In-Reply-To: <20161126231350.10321-8-bigeasy@linutronix.de> References: <20161126231350.10321-8-bigeasy@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:smp/hotplug] mm/vmstat: Drop get_online_cpus() from init_cpu_node_state/vmstat_cpu_dead() Git-Commit-ID: 76f290935b1a395ee6c9a14697f16593591d1fe8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 76f290935b1a395ee6c9a14697f16593591d1fe8 Gitweb: http://git.kernel.org/tip/76f290935b1a395ee6c9a14697f16593591d1fe8 Author: Sebastian Andrzej Siewior AuthorDate: Sun, 27 Nov 2016 00:13:35 +0100 Committer: Thomas Gleixner CommitDate: Fri, 2 Dec 2016 00:52:35 +0100 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 Acked-by: Michal Hocko Cc: linux-mm@kvack.org Cc: rt@linutronix.de Cc: Johannes Weiner Cc: Andrew Morton Cc: Mel Gorman Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/20161126231350.10321-8-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner --- mm/vmstat.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/vmstat.c b/mm/vmstat.c index 604f26a..0b63ffb 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(); } /*