diff options
-rw-r--r-- | block/cfq-iosched.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 07b70624377..0280fe661cd 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -462,6 +462,12 @@ static void cfq_add_rq_rb(struct request *rq) if (!cfq_cfqq_on_rr(cfqq)) cfq_add_cfqq_rr(cfqd, cfqq); + + /* + * check if this request is a better next-serve candidate + */ + cfqq->next_rq = cfq_choose_req(cfqd, cfqq->next_rq, rq); + BUG_ON(!cfqq->next_rq); } static inline void @@ -1623,12 +1629,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, cfqq->meta_pending++; /* - * check if this request is a better next-serve candidate)) { - */ - cfqq->next_rq = cfq_choose_req(cfqd, cfqq->next_rq, rq); - BUG_ON(!cfqq->next_rq); - - /* * we never wait for an async request and we don't allow preemption * of an async request. so just return early */ |