aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-25 06:23:59 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-25 06:23:59 -0400
commitace7f1b79670aa0c1d9f4b0442be82e565827333 (patch)
treeed4625a9cbc8e28db2b1ff9fad111c4c012508a3 /kernel/sched.c
parenta60b33cf59d1c9e0e363287fce799cb23d45660c (diff)
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
Merge branch 'linus' into core/softirq
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 33680bc17cf4..56958359d20c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4398,22 +4398,20 @@ do_wait_for_common(struct completion *x, long timeout, int state)
4398 signal_pending(current)) || 4398 signal_pending(current)) ||
4399 (state == TASK_KILLABLE && 4399 (state == TASK_KILLABLE &&
4400 fatal_signal_pending(current))) { 4400 fatal_signal_pending(current))) {
4401 __remove_wait_queue(&x->wait, &wait); 4401 timeout = -ERESTARTSYS;
4402 return -ERESTARTSYS; 4402 break;
4403 } 4403 }
4404 __set_current_state(state); 4404 __set_current_state(state);
4405 spin_unlock_irq(&x->wait.lock); 4405 spin_unlock_irq(&x->wait.lock);
4406 timeout = schedule_timeout(timeout); 4406 timeout = schedule_timeout(timeout);
4407 spin_lock_irq(&x->wait.lock); 4407 spin_lock_irq(&x->wait.lock);
4408 if (!timeout) { 4408 } while (!x->done && timeout);
4409 __remove_wait_queue(&x->wait, &wait);
4410 return timeout;
4411 }
4412 } while (!x->done);
4413 __remove_wait_queue(&x->wait, &wait); 4409 __remove_wait_queue(&x->wait, &wait);
4410 if (!x->done)
4411 return timeout;
4414 } 4412 }
4415 x->done--; 4413 x->done--;
4416 return timeout; 4414 return timeout ?: 1;
4417} 4415}
4418 4416
4419static long __sched 4417static long __sched