Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=51e97990234ed195a05b424bf04c387f5ae5e5cf
Commit:     51e97990234ed195a05b424bf04c387f5ae5e5cf
Parent:     d85714d81cc0408daddb68c10f7fd69eafe7c213
Author:     Andi Kleen <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 21:32:55 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Thu Oct 18 21:32:55 2007 +0200

    sched: fix return value of wait_for_completion_interruptible()
    
    The recent wait_for_completion() cleanups:
    
        commit 8cbbe86dfcfd68ad69916164bdc838d9e09adca8
        Author: Andi Kleen <[EMAIL PROTECTED]>
        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 <[EMAIL PROTECTED]>
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 92721d1..f6febb2 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3859,7 +3859,10 @@ EXPORT_SYMBOL(wait_for_completion_timeout);
 
 int __sched wait_for_completion_interruptible(struct completion *x)
 {
-       return wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_INTERRUPTIBLE);
+       long t = wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_INTERRUPTIBLE);
+       if (t == -ERESTARTSYS)
+               return t;
+       return 0;
 }
 EXPORT_SYMBOL(wait_for_completion_interruptible);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to