aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/util.c
diff options
context:
space:
mode:
authorNadia Derbey <Nadia.Derbey@bull.net>2007-10-19 02:40:50 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:44 -0400
commit637c36634029e4e7c81112796dafc32d56355b4a (patch)
treeb30106d838864fe6c8ba97c7dc68304b820e7694 /ipc/util.c
parent7748dbfaa010b12d5fb9ddf80199534c565c6bce (diff)
ipc: remove the ipc_get() routine
This is a trivial patch that removes the ipc_get() routine: it is replaced by a call to idr_find(). Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/util.c')
-rw-r--r--ipc/util.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/ipc/util.c b/ipc/util.c
index 03b88798f71f..e72865f677a7 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -669,25 +669,6 @@ void ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out)
669 out->seq = in->seq; 669 out->seq = in->seq;
670} 670}
671 671
672/*
673 * So far only shm_get_stat() calls ipc_get() via shm_get(), so ipc_get()
674 * is called with shm_ids.mutex locked. Since grow_ary() is also called with
675 * shm_ids.mutex down(for Shared Memory), there is no need to add read
676 * barriers here to gurantee the writes in grow_ary() are seen in order
677 * here (for Alpha).
678 *
679 * However ipc_get() itself does not necessary require ipc_ids.mutex down. So
680 * if in the future ipc_get() is used by other places without ipc_ids.mutex
681 * down, then ipc_get() needs read memery barriers as ipc_lock() does.
682 */
683struct kern_ipc_perm *ipc_get(struct ipc_ids *ids, int id)
684{
685 struct kern_ipc_perm *out;
686 int lid = id % SEQ_MULTIPLIER;
687 out = idr_find(&ids->ipcs_idr, lid);
688 return out;
689}
690
691struct kern_ipc_perm *ipc_lock(struct ipc_ids *ids, int id) 672struct kern_ipc_perm *ipc_lock(struct ipc_ids *ids, int id)
692{ 673{
693 struct kern_ipc_perm *out; 674 struct kern_ipc_perm *out;