mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
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>
This commit is contained in:
parent
6d49dab8ae
commit
73b29505c3
1 changed files with 1 additions and 3 deletions
|
@ -329,9 +329,7 @@ static inline void sem_lock_and_putref(struct sem_array *sma)
|
||||||
|
|
||||||
static inline void sem_putref(struct sem_array *sma)
|
static inline void sem_putref(struct sem_array *sma)
|
||||||
{
|
{
|
||||||
sem_lock_and_putref(sma);
|
ipc_rcu_putref(sma);
|
||||||
sem_unlock(sma, -1);
|
|
||||||
rcu_read_unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s)
|
static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s)
|
||||||
|
|
Loading…
Reference in a new issue