diff options
author | Willy Tarreau <w@1wt.eu> | 2017-02-06 08:59:06 +0100 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2017-02-10 11:03:58 +0100 |
commit | 3d971ee18fe6ca21b722ce2c7e7a1d834d60929b (patch) | |
tree | 6ecb16107ba63e1002af27d9e5479f5e2167c165 | |
parent | 9c559b0f16355aaf8de2aac991be2dd90c13792b (diff) | |
download | linux-stable-3d971ee18fe6ca21b722ce2c7e7a1d834d60929b.tar.gz linux-stable-3d971ee18fe6ca21b722ce2c7e7a1d834d60929b.tar.bz2 linux-stable-3d971ee18fe6ca21b722ce2c7e7a1d834d60929b.zip |
Revert "ipc/sem.c: optimize sem_lock()"
This reverts commit 901f6fedc5340d66e2ca67c70dfee926cb5a1ea0
(upstream commit 6d07b68ce16ae9535955ba2059dedba5309c3ca1).
As suggested in commit 5864a2fd3088db73d47942370d0f7210a807b9bc
(ipc/sem.c: fix complex_count vs. simple op race) since it introduces
a regression and the candidate fix requires too many changes for 3.10.
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r-- | ipc/sem.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/ipc/sem.c b/ipc/sem.c index 47a15192b8b8..3b968a028ccf 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -267,20 +267,12 @@ static void sem_rcu_free(struct rcu_head *head) * Caller must own sem_perm.lock. * New simple ops cannot start, because simple ops first check * that sem_perm.lock is free. - * that a) sem_perm.lock is free and b) complex_count is 0. */ static void sem_wait_array(struct sem_array *sma) { int i; struct sem *sem; - if (sma->complex_count) { - /* The thread that increased sma->complex_count waited on - * all sem->lock locks. Thus we don't need to wait again. - */ - return; - } - for (i = 0; i < sma->sem_nsems; i++) { sem = sma->sem_base + i; spin_unlock_wait(&sem->lock); |