aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/sem.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index 5ad7ac0ed60d..7e8a25c82ef3 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1054,7 +1054,7 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops,
1054 struct sembuf fast_sops[SEMOPM_FAST]; 1054 struct sembuf fast_sops[SEMOPM_FAST];
1055 struct sembuf* sops = fast_sops, *sop; 1055 struct sembuf* sops = fast_sops, *sop;
1056 struct sem_undo *un; 1056 struct sem_undo *un;
1057 int undos = 0, decrease = 0, alter = 0, max; 1057 int undos = 0, alter = 0, max;
1058 struct sem_queue queue; 1058 struct sem_queue queue;
1059 unsigned long jiffies_left = 0; 1059 unsigned long jiffies_left = 0;
1060 1060
@@ -1089,13 +1089,10 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops,
1089 if (sop->sem_num >= max) 1089 if (sop->sem_num >= max)
1090 max = sop->sem_num; 1090 max = sop->sem_num;
1091 if (sop->sem_flg & SEM_UNDO) 1091 if (sop->sem_flg & SEM_UNDO)
1092 undos++; 1092 undos = 1;
1093 if (sop->sem_op < 0) 1093 if (sop->sem_op != 0)
1094 decrease = 1;
1095 if (sop->sem_op > 0)
1096 alter = 1; 1094 alter = 1;
1097 } 1095 }
1098 alter |= decrease;
1099 1096
1100retry_undos: 1097retry_undos:
1101 if (undos) { 1098 if (undos) {