afh_recv: Don't set t->error unnecessarily.
authorAndre Noll <maan@systemlinux.org>
Tue, 31 Dec 2013 03:22:40 +0000 (03:22 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 25 May 2014 13:36:37 +0000 (15:36 +0200)
It is always wrong to set t->error directly as this can only confuse
the scheduler.

afh_recv.c

index 0c7b394..941ec4e 100644 (file)
@@ -60,7 +60,6 @@ static int afh_execute(struct btr_node *btrn, const char *cmd, char **result)
                if (x >= pard->afhi.chunks_total)
                        return -ERRNO_TO_PARA_ERROR(EINVAL);
                pard->first_chunk = pard->current_chunk = x;
                if (x >= pard->afhi.chunks_total)
                        return -ERRNO_TO_PARA_ERROR(EINVAL);
                pard->first_chunk = pard->current_chunk = x;
-               rn->task.error = 0;
                return 1;
        }
        return -E_BTR_NAVAIL;
                return 1;
        }
        return -E_BTR_NAVAIL;