aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/util.c
diff options
context:
space:
mode:
authorPierre Peiffer <pierre.peiffer@bull.net>2008-04-29 04:00:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:12 -0400
commit48dea404ed01869313f1908cca8a15774dcd8ee5 (patch)
treec4c50c9032556cf96b21f8704e4544998769b6b9 /ipc/util.c
parent02d15c43225afb2ebb6d700144285175a1c4abd9 (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/util.c')
-rw-r--r--ipc/util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ipc/util.c b/ipc/util.c
index fd1b50da9db8..cb017c7b9370 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -231,6 +231,7 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size)
231 if(ids->seq > ids->seq_max) 231 if(ids->seq > ids->seq_max)
232 ids->seq = 0; 232 ids->seq = 0;
233 233
234 new->id = ipc_buildid(id, new->seq);
234 spin_lock_init(&new->lock); 235 spin_lock_init(&new->lock);
235 new->deleted = 0; 236 new->deleted = 0;
236 rcu_read_lock(); 237 rcu_read_lock();