@@ -3120,7 +3120,7 @@ void elv_ioq_completed_request(struct request_queue *q, struct request *rq)
}
/* Wait for requests to finish from this queue */
- if (efqd->fairness && ioq->dispatched)
+ if (efqd->fairness && elv_ioq_nr_dispatched(ioq))
goto done;
/* Expire the queue */
@@ -3135,7 +3135,7 @@ void elv_ioq_completed_request(struct request_queue *q, struct request *rq)
* If this is the last queue in the group and we did not
* decide to idle on queue, idle on group.
*/
- if (elv_iog_should_idle(ioq) && !ioq->dispatched
+ if (elv_iog_should_idle(ioq) && !elv_ioq_nr_dispatched(ioq)
&& !timer_pending(&efqd->idle_slice_timer)) {
/*
* If queue has used up its slice, wait for the