diff options
author | Pierre Peiffer <pierre.peiffer@bull.net> | 2008-04-29 04:00:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:12 -0400 |
commit | 48dea404ed01869313f1908cca8a15774dcd8ee5 (patch) | |
tree | c4c50c9032556cf96b21f8704e4544998769b6b9 /ipc/msg.c | |
parent | 02d15c43225afb2ebb6d700144285175a1c4abd9 (diff) |
IPC: use ipc_buildid() directly from ipc_addid()
By continuing to consolidate a little the IPC code, each id can be built
directly in ipc_addid() instead of having it built from each callers of
ipc_addid()
And I also remove shm_addid() in order to have, as much as possible, the
same code for shm/sem/msg.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Pierre Peiffer <pierre.peiffer@bull.net>
Cc: 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/msg.c')
-rw-r--r-- | ipc/msg.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -70,7 +70,6 @@ struct msg_sender { | |||
70 | #define msg_ids(ns) ((ns)->ids[IPC_MSG_IDS]) | 70 | #define msg_ids(ns) ((ns)->ids[IPC_MSG_IDS]) |
71 | 71 | ||
72 | #define msg_unlock(msq) ipc_unlock(&(msq)->q_perm) | 72 | #define msg_unlock(msq) ipc_unlock(&(msq)->q_perm) |
73 | #define msg_buildid(id, seq) ipc_buildid(id, seq) | ||
74 | 73 | ||
75 | static void freeque(struct ipc_namespace *, struct kern_ipc_perm *); | 74 | static void freeque(struct ipc_namespace *, struct kern_ipc_perm *); |
76 | static int newque(struct ipc_namespace *, struct ipc_params *); | 75 | static int newque(struct ipc_namespace *, struct ipc_params *); |
@@ -186,7 +185,6 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params) | |||
186 | return id; | 185 | return id; |
187 | } | 186 | } |
188 | 187 | ||
189 | msq->q_perm.id = msg_buildid(id, msq->q_perm.seq); | ||
190 | msq->q_stime = msq->q_rtime = 0; | 188 | msq->q_stime = msq->q_rtime = 0; |
191 | msq->q_ctime = get_seconds(); | 189 | msq->q_ctime = get_seconds(); |
192 | msq->q_cbytes = msq->q_qnum = 0; | 190 | msq->q_cbytes = msq->q_qnum = 0; |