Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755238AbcIAPGr (ORCPT ); Thu, 1 Sep 2016 11:06:47 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35992 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933266AbcIAPF3 (ORCPT ); Thu, 1 Sep 2016 11:05:29 -0400 From: Manfred Spraul To: benh@kernel.crashing.org, paulmck@linux.vnet.ibm.com, Ingo Molnar , Boqun Feng , Peter Zijlstra , Andrew Morton Cc: LKML , will.deacon@arm.com, 1vier1@web.de, Davidlohr Bueso , Manfred Spraul Subject: [PATCH 7/7] net/netfilter/nf_conntrack_core: Remove smp_mb() after spin_lock(). Date: Thu, 1 Sep 2016 17:04:17 +0200 Message-Id: <1472742257-10515-8-git-send-email-manfred@colorfullife.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472742257-10515-1-git-send-email-manfred@colorfullife.com> References: <1472742257-10515-1-git-send-email-manfred@colorfullife.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As spin_unlock_wait() is defined as equivalent to spin_lock(); spin_unlock(), the smp_mb() after spin_lock() is not required. Remove it. Signed-off-by: Manfred Spraul --- net/netfilter/nf_conntrack_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index c8a2d26..7a3b5e6 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -82,10 +82,7 @@ void nf_conntrack_lock(spinlock_t *lock) __acquires(lock) /* 1) Acquire the lock */ spin_lock(lock); - /* 2) Order storing the lock and reading nf_conntrack_locks_all */ - smp_mb(); - - /* 3) read nf_conntrack_locks_all, with ACQUIRE semantics */ + /* 2) read nf_conntrack_locks_all, with ACQUIRE semantics */ if (likely(smp_load_acquire(&nf_conntrack_locks_all) == false)) return; -- 2.7.4