aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 899b598b63be..04b264dbf141 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -815,6 +815,13 @@ static int count_semzcnt (struct sem_array * sma, ushort semnum)
815 struct sem_queue * q; 815 struct sem_queue * q;
816 816
817 semzcnt = 0; 817 semzcnt = 0;
818 list_for_each_entry(q, &sma->sem_base[semnum].sem_pending, list) {
819 struct sembuf * sops = q->sops;
820 BUG_ON(sops->sem_num != semnum);
821 if ((sops->sem_op == 0) && !(sops->sem_flg & IPC_NOWAIT))
822 semzcnt++;
823 }
824
818 list_for_each_entry(q, &sma->sem_pending, list) { 825 list_for_each_entry(q, &sma->sem_pending, list) {
819 struct sembuf * sops = q->sops; 826 struct sembuf * sops = q->sops;
820 int nsops = q->nsops; 827 int nsops = q->nsops;