diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index b6491c0..ca84f0b 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -961,8 +961,8 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq, /* * follow expired path, else get first next available */ - if ((rq = cfq_check_fifo(cfqq)) == NULL) - rq = cfqq->next_rq; + if (!(rq = cfq_check_fifo(cfqq)) && !(rq = cfqq->next_rq)) + break; /* * finally, insert request into driver dispatch list