+ ipc-drop-ipc_lock_by_ptr.patch added to -mm tree
Subject: + ipc-drop-ipc_lock_by_ptr.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 24 Jul 2013 13:23:28 -0700
The patch titled
Subject: ipc: drop ipc_lock_by_ptr
has been added to the -mm tree. Its filename is
ipc-drop-ipc_lock_by_ptr.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/ipc-drop-ipc_lock_by_ptr.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/ipc-drop-ipc_lock_by_ptr.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Davidlohr Bueso <[email protected]>
Subject: 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.
---
ipc/namespace.c | 3 ++- ipc/util.c | 6 ++++-- ipc/util.h | 6 ------ 3 files changed, 6 insertions(+), 9 deletions(-)
ipc/namespace.c renamed from ipc/namespace.c~ipc-drop-ipc_lock_by_ptr +2 -1
@@ -89,7 +89,8 @@ void free_ipcs(struct ipc_namespace *ns, perm =idr_find (&ids->ipcs_idr, next_id);if (perm ==NULL )continue ; -ipc_lock_by_ptr (perm); +rcu_read_lock (); +ipc_lock_object (perm);free (ns, perm); total++; }
ipc/util.c renamed from ipc/util.c~ipc-drop-ipc_lock_by_ptr +4 -2
@@ -205,7 +205,8 @@ static struct kern_ipc_perm *ipc_findkeycontinue ; } -ipc_lock_by_ptr (ipc); +rcu_read_lock (); +ipc_lock_object (ipc);return ipc; }
@@ -838,7 +839,8 @@ static struct kern_ipc_perm *sysvipc_fin ipc =idr_find (&ids->ipcs_idr, pos);if (ipc !=NULL ) { *new_pos = pos +1 ; -ipc_lock_by_ptr (ipc); +rcu_read_lock (); +ipc_lock_object (ipc);return ipc; } }
ipc/util.h renamed from ipc/util.h~ipc-drop-ipc_lock_by_ptr +0 -6
@@ -171,12 +171,6 @@ static inline void ipc_assert_locked_objassert_spin_locked (&perm->lock); } -static inline void ipc_lock_by_ptr (struct kern_ipc_perm *perm) -{ -rcu_read_lock (); -ipc_lock_object (perm); -} -static inline void ipc_unlock (struct kern_ipc_perm *perm) {ipc_unlock_object (perm);
_
Patches currently in -mm which might be from [email protected] are
ipcshm-introduce-lockless-functions-to-obtain-the-ipc-object.patch ipcshm-shorten-critical-region-in-shmctl_down.patch ipc-drop-ipcctl_pre_down.patch ipc-drop-ipcctl_pre_down-fix.patch ipcshm-introduce-shmctl_nolock.patch ipcshm-make-shmctl_nolock-lockless.patch ipcshm-make-shmctl_nolock-lockless-checkpatch-fixes.patch ipcshm-shorten-critical-region-for-shmctl.patch ipcshm-cleanup-do_shmat-pasta.patch ipcshm-shorten-critical-region-for-shmat.patch ipc-rename-ids-rw_mutex.patch ipcmsg-drop-msg_unlock.patch ipc-document-general-ipc-locking-scheme.patch ipc-shm-guard-against-non-existant-vma-in-shmdt2.patch ipc-drop-ipc_lock_by_ptr.patch ipc-shm-drop-shm_lock_check.patch ipc-drop-ipc_lock_check.patch
linux-next.patch