From: Linus Torvalds Date: Fri, 3 May 2013 22:22:00 +0000 (-0700) Subject: ipc: sem_putref() does not need the semaphore lock any more X-Git-Tag: v3.10-rc1~93^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73b29505c36eeb4751eccad41f6aad78562521f8;p=profile%2Fcommon%2Fkernel-common.git 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 Cc: Rik van Riel Cc: Al Viro Signed-off-by: Linus Torvalds --- diff --git a/ipc/sem.c b/ipc/sem.c index 4b4139f..5cf7b4c 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -329,9 +329,7 @@ static inline void sem_lock_and_putref(struct sem_array *sma) static inline void sem_putref(struct sem_array *sma) { - sem_lock_and_putref(sma); - sem_unlock(sma, -1); - rcu_read_unlock(); + ipc_rcu_putref(sma); } static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s)