summaryrefslogtreecommitdiff
path: root/ipc/sem.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-26 17:11:03 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-26 17:11:03 -0400
commit8b0ee07e108b2eefdab5bb73f33223f18926c3b2 (patch)
treef68ca04180c5488301a40ec212ef2eb2467cf56c /ipc/sem.c
parent4638aef40ba9ebb9734caeed1f373c24015259fd (diff)
parent8678887e7fb43cd6c9be6c9807b05e77848e0920 (diff)
Merge upstream (approx. 2.6.12-git8) into 'janitor' branch of netdev-2.6.
Diffstat (limited to 'ipc/sem.c')
-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,
struct sembuf fast_sops[SEMOPM_FAST];
struct sembuf* sops = fast_sops, *sop;
struct sem_undo *un;
- int undos = 0, decrease = 0, alter = 0, max;
+ int undos = 0, alter = 0, max;
struct sem_queue queue;
unsigned long jiffies_left = 0;
@@ -1089,13 +1089,10 @@ asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops,
if (sop->sem_num >= max)
max = sop->sem_num;
if (sop->sem_flg & SEM_UNDO)
- undos++;
- if (sop->sem_op < 0)
- decrease = 1;
- if (sop->sem_op > 0)
+ undos = 1;
+ if (sop->sem_op != 0)
alter = 1;
}
- alter |= decrease;
retry_undos:
if (undos) {