aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2007-10-18 15:32:55 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-18 15:32:55 -0400
commit51e97990234ed195a05b424bf04c387f5ae5e5cf (patch)
tree9b1cc97b89057464f9a06ac49fab95257da23fdc /kernel/sched.c
parentd85714d81cc0408daddb68c10f7fd69eafe7c213 (diff)
sched: fix return value of wait_for_completion_interruptible()
The recent wait_for_completion() cleanups: commit 8cbbe86dfcfd68ad69916164bdc838d9e09adca8 Author: Andi Kleen <ak@suse.de> Date: Mon Oct 15 17:00:14 2007 +0200 sched: cleanup: refactor common code of sleep_on / wait_for_completion Refactor common code of sleep_on / wait_for_completion broke the return value of wait_for_completion_interruptible(). Previously it returned 0 on success, now -1. Fix that. Problem found by Geert Uytterhoeven. [ mingo: fixed whitespace damage ] Reported-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 92721d1534b8..f6febb25c7b6 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3859,7 +3859,10 @@ EXPORT_SYMBOL(wait_for_completion_timeout);
3859 3859
3860int __sched wait_for_completion_interruptible(struct completion *x) 3860int __sched wait_for_completion_interruptible(struct completion *x)
3861{ 3861{
3862 return wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_INTERRUPTIBLE); 3862 long t = wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_INTERRUPTIBLE);
3863 if (t == -ERESTARTSYS)
3864 return t;
3865 return 0;
3863} 3866}
3864EXPORT_SYMBOL(wait_for_completion_interruptible); 3867EXPORT_SYMBOL(wait_for_completion_interruptible);
3865 3868