diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-25 06:27:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-25 06:27:56 -0400 |
commit | 97e6722b8d6b5880c4d5751127d5083b1b7df27d (patch) | |
tree | 060c52298d42530f975064f7addc4e637fe00289 /kernel/sched.c | |
parent | f22f9a89ce6857d377bf22dba4c1a8cd256c5136 (diff) | |
parent | 543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff) |
Merge branch 'linus' into tracing/ftrace
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 27eaa47d438a..1ffa76813a01 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -4449,22 +4449,20 @@ do_wait_for_common(struct completion *x, long timeout, int state) | |||
4449 | signal_pending(current)) || | 4449 | signal_pending(current)) || |
4450 | (state == TASK_KILLABLE && | 4450 | (state == TASK_KILLABLE && |
4451 | fatal_signal_pending(current))) { | 4451 | fatal_signal_pending(current))) { |
4452 | __remove_wait_queue(&x->wait, &wait); | 4452 | timeout = -ERESTARTSYS; |
4453 | return -ERESTARTSYS; | 4453 | break; |
4454 | } | 4454 | } |
4455 | __set_current_state(state); | 4455 | __set_current_state(state); |
4456 | spin_unlock_irq(&x->wait.lock); | 4456 | spin_unlock_irq(&x->wait.lock); |
4457 | timeout = schedule_timeout(timeout); | 4457 | timeout = schedule_timeout(timeout); |
4458 | spin_lock_irq(&x->wait.lock); | 4458 | spin_lock_irq(&x->wait.lock); |
4459 | if (!timeout) { | 4459 | } while (!x->done && timeout); |
4460 | __remove_wait_queue(&x->wait, &wait); | ||
4461 | return timeout; | ||
4462 | } | ||
4463 | } while (!x->done); | ||
4464 | __remove_wait_queue(&x->wait, &wait); | 4460 | __remove_wait_queue(&x->wait, &wait); |
4461 | if (!x->done) | ||
4462 | return timeout; | ||
4465 | } | 4463 | } |
4466 | x->done--; | 4464 | x->done--; |
4467 | return timeout; | 4465 | return timeout ?: 1; |
4468 | } | 4466 | } |
4469 | 4467 | ||
4470 | static long __sched | 4468 | static long __sched |