projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d49dab
)
ipc: sem_putref() does not need the semaphore lock any more
author
Linus Torvalds
<
[email protected]
>
Fri, 3 May 2013 22:22:00 +0000
(15:22 -0700)
committer
Linus Torvalds
<
[email protected]
>
Sat, 4 May 2013 18:24:21 +0000
(11:24 -0700)
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 <
[email protected]
>
Cc: Rik van Riel <
[email protected]
>
Cc: Al Viro <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
ipc/sem.c
patch
|
blob
|
history
diff --git
a/ipc/sem.c
b/ipc/sem.c
index 4b4139f6ad5c83e07a538436f0cc0100e462f061..5cf7b4c093b3092b6038437f4546f836173f3611 100644
(file)
--- 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)