diff options
Diffstat (limited to 'ipc/sem.c')
-rw-r--r-- | ipc/sem.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -89,10 +89,8 @@ | |||
89 | #define sem_ids(ns) (*((ns)->ids[IPC_SEM_IDS])) | 89 | #define sem_ids(ns) (*((ns)->ids[IPC_SEM_IDS])) |
90 | 90 | ||
91 | #define sem_unlock(sma) ipc_unlock(&(sma)->sem_perm) | 91 | #define sem_unlock(sma) ipc_unlock(&(sma)->sem_perm) |
92 | #define sem_checkid(ns, sma, semid) \ | 92 | #define sem_checkid(sma, semid) ipc_checkid(&sma->sem_perm, semid) |
93 | ipc_checkid(&sem_ids(ns),&sma->sem_perm,semid) | 93 | #define sem_buildid(id, seq) ipc_buildid(id, seq) |
94 | #define sem_buildid(ns, id, seq) \ | ||
95 | ipc_buildid(&sem_ids(ns), id, seq) | ||
96 | 94 | ||
97 | static struct ipc_ids init_sem_ids; | 95 | static struct ipc_ids init_sem_ids; |
98 | 96 | ||
@@ -292,7 +290,7 @@ static int newary(struct ipc_namespace *ns, struct ipc_params *params) | |||
292 | } | 290 | } |
293 | ns->used_sems += nsems; | 291 | ns->used_sems += nsems; |
294 | 292 | ||
295 | sma->sem_perm.id = sem_buildid(ns, id, sma->sem_perm.seq); | 293 | sma->sem_perm.id = sem_buildid(id, sma->sem_perm.seq); |
296 | sma->sem_base = (struct sem *) &sma[1]; | 294 | sma->sem_base = (struct sem *) &sma[1]; |
297 | /* sma->sem_pending = NULL; */ | 295 | /* sma->sem_pending = NULL; */ |
298 | sma->sem_pending_last = &sma->sem_pending; | 296 | sma->sem_pending_last = &sma->sem_pending; |
@@ -1386,7 +1384,7 @@ void exit_sem(struct task_struct *tsk) | |||
1386 | if (u->semid == -1) | 1384 | if (u->semid == -1) |
1387 | goto next_entry; | 1385 | goto next_entry; |
1388 | 1386 | ||
1389 | BUG_ON(sem_checkid(ns,sma,u->semid)); | 1387 | BUG_ON(sem_checkid(sma, u->semid)); |
1390 | 1388 | ||
1391 | /* remove u from the sma->undo list */ | 1389 | /* remove u from the sma->undo list */ |
1392 | for (unp = &sma->undo; (un = *unp); unp = &un->id_next) { | 1390 | for (unp = &sma->undo; (un = *unp); unp = &un->id_next) { |