file writer pre_select() fixes.
authorAndre Noll <maan@systemlinux.org>
Tue, 5 Jan 2010 05:05:33 +0000 (06:05 +0100)
committerAndre Noll <maan@systemlinux.org>
Tue, 5 Jan 2010 05:05:33 +0000 (06:05 +0100)
file_write.c

index a9635ca..8baaa84 100644 (file)
@@ -97,11 +97,10 @@ static void file_write_pre_select_btr(struct sched *s, struct task *t)
        t->error = 0;
        pfwd->check_fd = 0;
        ret = btr_node_status(wn->btrn, wn->min_iqs);
-       if (ret >= 0) {
+       if (ret > 0) {
                para_fd_set(pfwd->fd, &s->wfds, &s->max_fileno);
                pfwd->check_fd = 1;
-       }
-       if (ret != 0) {
+       } else if (ret < 0) {
                s->timeout.tv_sec = 0;
                s->timeout.tv_usec = 1;
        }