Skip to contentSkip to conversation

ipc-introduce-ipc-object-locking-helpers.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 9, 2013

lore
Share & tools
lore
#0 lore raw

Subject: [merged] ipc-introduce-ipc-object-locking-helpers.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 09 Jul 2013 16:21:31 -0700

The patch titled
Subject: ipc: introduce ipc object locking helpers
has been removed from the -mm tree. Its filename was
ipc-introduce-ipc-object-locking-helpers.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Davidlohr Bueso <[email protected]>
Subject: ipc: introduce ipc object locking helpers

Simple helpers around the (kern_ipc_perm *)->lock spinlock.

---

 ipc/util.h |   20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)
ipc/util.h renamed from ipc/util.h~ipc-introduce-ipc-object-locking-helpers +15 -5
diff -puN ipc/util.h~ipc-introduce-ipc-object-locking-helpers ipc/util.h
@@ -159,23 +159,33 @@ static inline int ipc_checkid(struct ker
 	return uid / SEQ_MULTIPLIER != ipcp->seq;
 }
 
-static inline void ipc_lock_by_ptr(struct kern_ipc_perm *perm)
+static inline void ipc_lock_object(struct kern_ipc_perm *perm)
 {
-	rcu_read_lock();
 	spin_lock(&perm->lock);
 }
 
-static inline void ipc_unlock(struct kern_ipc_perm *perm)
+static inline void ipc_unlock_object(struct kern_ipc_perm *perm)
 {
 	spin_unlock(&perm->lock);
-	rcu_read_unlock();
 }
 
-static inline void ipc_lock_object(struct kern_ipc_perm *perm)
+static inline void ipc_assert_locked_object(struct kern_ipc_perm *perm)
 {
+	assert_spin_locked(&perm->lock);
+}
+
+static inline void ipc_lock_by_ptr(struct kern_ipc_perm *perm)
+{
+	rcu_read_lock();
 	spin_lock(&perm->lock);
 }
 
+static inline void ipc_unlock(struct kern_ipc_perm *perm)
+{
+	spin_unlock(&perm->lock);
+	rcu_read_unlock();
+}
+
 struct kern_ipc_perm *ipc_lock_check(struct ipc_ids *ids, int id);
 struct kern_ipc_perm *ipc_obtain_object_check(struct ipc_ids *ids, int id);
 int ipcget(struct ipc_namespace *ns, struct ipc_ids *ids,

_

Patches currently in -mm which might be from [email protected] are

origin.patch