aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/cfq-iosched.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 7104ac816fb6..b773000f8a06 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2205,10 +2205,13 @@ static int cfq_forced_dispatch(struct cfq_data *cfqd)
2205 struct cfq_queue *cfqq; 2205 struct cfq_queue *cfqq;
2206 int dispatched = 0; 2206 int dispatched = 0;
2207 2207
2208 while ((cfqq = cfq_get_next_queue_forced(cfqd)) != NULL) 2208 /* Expire the timeslice of the current active queue first */
2209 cfq_slice_expired(cfqd, 0);
2210 while ((cfqq = cfq_get_next_queue_forced(cfqd)) != NULL) {
2211 __cfq_set_active_queue(cfqd, cfqq);
2209 dispatched += __cfq_forced_dispatch_cfqq(cfqq); 2212 dispatched += __cfq_forced_dispatch_cfqq(cfqq);
2213 }
2210 2214
2211 cfq_slice_expired(cfqd, 0);
2212 BUG_ON(cfqd->busy_queues); 2215 BUG_ON(cfqd->busy_queues);
2213 2216
2214 cfq_log(cfqd, "forced_dispatch=%d", dispatched); 2217 cfq_log(cfqd, "forced_dispatch=%d", dispatched);