[PATCH 9/7] ipc/sem.c: Remove another memory barrier.

From: Manfred Spraul
Date: Thu Sep 01 2016 - 11:28:09 EST


As spin_unlock_wait() is defined as equivalent to spin_lock();
spin_unlock(), the memory barrier before spin_unlock_wait()
is not required.

Signed-off-by: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
---
ipc/sem.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index a5da82c..2bef9c0 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -280,11 +280,7 @@ static void complexmode_enter(struct sem_array *sma)
return;
}

- /* We need a full barrier after seting complex_mode:
- * The write to complex_mode must be visible
- * before we read the first sem->lock spinlock state.
- */
- smp_store_mb(sma->complex_mode, true);
+ sma->complex_mode = true;

for (i = 0; i < sma->sem_nsems; i++) {
sem = sma->sem_base + i;
--
2.7.4