sched: Only call post_select() if task is not in error state.
[paraslash.git] / sched.c
diff --git a/sched.c b/sched.c
index 4e989d3..9be3a2e 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -93,7 +93,8 @@ static void sched_post_select(struct sched *s)
        struct task *t, *tmp;
 
        list_for_each_entry_safe(t, tmp, &post_select_list, post_select_node) {
-               call_post_select(s, t);
+               if (t->error >= 0)
+                       call_post_select(s, t);
 //             PARA_INFO_LOG("%s: %d\n", t->status, t->ret);
                if (t->error >= 0)
                        continue;