lkml.org 
[lkml]   [2016]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 7/7] net/netfilter/nf_conntrack_core: Remove smp_mb() after spin_lock().
Date
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 <manfred@colorfullife.com>
---
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
\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.046 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site