aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-03 18:22:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-04 14:24:21 -0400
commit73b29505c36eeb4751eccad41f6aad78562521f8 (patch)
tree228603617659029e082a0968b2e0a6490c121b0d
parent6d49dab8ae06c6d35a4d0967364a9ecbe8fdea2c (diff)
ipc: sem_putref() does not need the semaphore lock any more
ipc_rcu_putref() uses atomics for the refcount, and the games to lock and unlock the semaphore just to try to keep the reference counting working are no longer useful. Acked-by: Davidlohr Bueso <davidlohr.bueso@hp.com> Cc: Rik van Riel <riel@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--ipc/sem.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 4b4139f6ad5c..5cf7b4c093b3 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -329,9 +329,7 @@ static inline void sem_lock_and_putref(struct sem_array *sma)
329 329
330static inline void sem_putref(struct sem_array *sma) 330static inline void sem_putref(struct sem_array *sma)
331{ 331{
332 sem_lock_and_putref(sma); 332 ipc_rcu_putref(sma);
333 sem_unlock(sma, -1);
334 rcu_read_unlock();
335} 333}
336 334
337static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s) 335static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s)