aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorNadia Derbey <Nadia.Derbey@bull.net>2007-10-19 02:40:52 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-19 14:53:47 -0400
commit28028313134e9f11e49f74a4beaa47c91e5ebf06 (patch)
treeadf36a3b40c5cb48ff5bd8803fc10530bac65450 /ipc
parentce621f5ba52f30dd59aef4fb50276faee04ef9cf (diff)
ipc: inline ipc_buildid()
This is a trivial patch that changes the ipc_buildid() routine into a static inline. 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')
-rw-r--r--ipc/util.c5
-rw-r--r--ipc/util.h6
2 files changed, 5 insertions, 6 deletions
diff --git a/ipc/util.c b/ipc/util.c
index c51c96f2e0cf..49e75efe305b 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -695,11 +695,6 @@ struct kern_ipc_perm *ipc_lock(struct ipc_ids *ids, int id)
695 return out; 695 return out;
696} 696}
697 697
698int ipc_buildid(struct ipc_ids* ids, int id, int seq)
699{
700 return SEQ_MULTIPLIER*seq + id;
701}
702
703#ifdef __ARCH_WANT_IPC_PARSE_VERSION 698#ifdef __ARCH_WANT_IPC_PARSE_VERSION
704 699
705 700
diff --git a/ipc/util.h b/ipc/util.h
index fa7e7a07486e..76f8a79902de 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -107,7 +107,6 @@ void ipc_rcu_getref(void *ptr);
107void ipc_rcu_putref(void *ptr); 107void ipc_rcu_putref(void *ptr);
108 108
109struct kern_ipc_perm *ipc_lock(struct ipc_ids *, int); 109struct kern_ipc_perm *ipc_lock(struct ipc_ids *, int);
110int ipc_buildid(struct ipc_ids* ids, int id, int seq);
111 110
112void kernel_to_ipc64_perm(struct kern_ipc_perm *in, struct ipc64_perm *out); 111void kernel_to_ipc64_perm(struct kern_ipc_perm *in, struct ipc64_perm *out);
113void ipc64_perm_to_ipc_perm(struct ipc64_perm *in, struct ipc_perm *out); 112void ipc64_perm_to_ipc_perm(struct ipc64_perm *in, struct ipc_perm *out);
@@ -127,6 +126,11 @@ extern int ipcget_new(struct ipc_namespace *, struct ipc_ids *,
127extern int ipcget_public(struct ipc_namespace *, struct ipc_ids *, 126extern int ipcget_public(struct ipc_namespace *, struct ipc_ids *,
128 struct ipc_ops *, struct ipc_params *); 127 struct ipc_ops *, struct ipc_params *);
129 128
129static inline int ipc_buildid(struct ipc_ids *ids, int id, int seq)
130{
131 return SEQ_MULTIPLIER * seq + id;
132}
133
130static inline int ipc_checkid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp, 134static inline int ipc_checkid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp,
131 int uid) 135 int uid)
132{ 136{