complexmode_enter() contains an smp_rmb() after spin_unlock_wait(). This was done to allow safe backporting.
With commit 2c6100227116 ("locking/qspinlock: Fix spin_unlock_wait() some more"), (and the commits for the other archs), spin_unlock_wait() is an ACQUIRE. Therefore the smp_rmb() after spin_unlock_wait() can be removed. Not for stable! Signed-off-by: Manfred Spraul <manf...@colorfullife.com> --- ipc/sem.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ipc/sem.c b/ipc/sem.c index 5e318c5..6586e0a 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -290,14 +290,6 @@ static void complexmode_enter(struct sem_array *sma) sem = sma->sem_base + i; spin_unlock_wait(&sem->lock); } - /* - * spin_unlock_wait() is not a memory barriers, it is only a - * control barrier. The code must pair with spin_unlock(&sem->lock), - * thus just the control barrier is insufficient. - * - * smp_rmb() is sufficient, as writes cannot pass the control barrier. - */ - smp_rmb(); } /* -- 2.7.4