aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <davidlohr.bueso@hp.com>2013-07-08 19:01:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 13:33:27 -0400
commitcf9d5d78d05bca96df7618dfc3a5ee4414dcae58 (patch)
treeb03375cb8d7a2482ad659bd9b675589f427c2336 /ipc/shm.c
parent1ca7003ab41152d673d9e359632283d05294f3d6 (diff)
ipc: close open coded spin lock calls
Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index bd2b14ef1bba..e7d51072d1c7 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -141,7 +141,7 @@ static inline struct shmid_kernel *shm_lock(struct ipc_namespace *ns, int id)
141static inline void shm_lock_by_ptr(struct shmid_kernel *ipcp) 141static inline void shm_lock_by_ptr(struct shmid_kernel *ipcp)
142{ 142{
143 rcu_read_lock(); 143 rcu_read_lock();
144 spin_lock(&ipcp->shm_perm.lock); 144 ipc_lock_object(&ipcp->shm_perm);
145} 145}
146 146
147static inline struct shmid_kernel *shm_lock_check(struct ipc_namespace *ns, 147static inline struct shmid_kernel *shm_lock_check(struct ipc_namespace *ns,
@@ -545,7 +545,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
545 ns->shm_tot += numpages; 545 ns->shm_tot += numpages;
546 error = shp->shm_perm.id; 546 error = shp->shm_perm.id;
547 547
548 spin_unlock(&shp->shm_perm.lock); 548 ipc_unlock_object(&shp->shm_perm);
549 rcu_read_unlock(); 549 rcu_read_unlock();
550 return error; 550 return error;
551 551