Commit 32a2750010981216fb788c5190fb0e646abfab30
Committed by
Linus Torvalds
1 parent
530fcd16d8
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
ipc: drop ipc_lock_by_ptr
After previous cleanups and optimizations, this function is no longer heavily used and we don't have a good reason to keep it. Update the few remaining callers and get rid of it. Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com> Cc: Sedat Dilek <sedat.dilek@gmail.com> Cc: Rik van Riel <riel@redhat.com> Cc: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 3 changed files with 6 additions and 9 deletions Side-by-side Diff
ipc/namespace.c
ipc/util.c
... | ... | @@ -205,7 +205,8 @@ |
205 | 205 | continue; |
206 | 206 | } |
207 | 207 | |
208 | - ipc_lock_by_ptr(ipc); | |
208 | + rcu_read_lock(); | |
209 | + ipc_lock_object(ipc); | |
209 | 210 | return ipc; |
210 | 211 | } |
211 | 212 | |
... | ... | @@ -838,7 +839,8 @@ |
838 | 839 | ipc = idr_find(&ids->ipcs_idr, pos); |
839 | 840 | if (ipc != NULL) { |
840 | 841 | *new_pos = pos + 1; |
841 | - ipc_lock_by_ptr(ipc); | |
842 | + rcu_read_lock(); | |
843 | + ipc_lock_object(ipc); | |
842 | 844 | return ipc; |
843 | 845 | } |
844 | 846 | } |
ipc/util.h
... | ... | @@ -171,12 +171,6 @@ |
171 | 171 | assert_spin_locked(&perm->lock); |
172 | 172 | } |
173 | 173 | |
174 | -static inline void ipc_lock_by_ptr(struct kern_ipc_perm *perm) | |
175 | -{ | |
176 | - rcu_read_lock(); | |
177 | - ipc_lock_object(perm); | |
178 | -} | |
179 | - | |
180 | 174 | static inline void ipc_unlock(struct kern_ipc_perm *perm) |
181 | 175 | { |
182 | 176 | ipc_unlock_object(perm); |