aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/util.c
diff options
context:
space:
mode:
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;