block, bfq: remove the removal of 'next' rq in bfq_requests_merged
Since bfq_finish_request() is always called on the request 'next', after bfq_requests_merged() is finished, and bfq_finish_request() removes 'next' from its bfq_queue if needed, it isn't necessary to do such a removal in advance in bfq_merged_requests(). This commit removes such a useless 'next' removal. Signed-off-by: Filippo Muzzini <filippo.muzzini@outlook.it> Signed-off-by: Paolo Valente <paolo.valente@linaro.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
8abfa4d6fd
commit
ac857e0d54
|
@ -1845,8 +1845,6 @@ static void bfq_request_merged(struct request_queue *q, struct request *req,
|
||||||
* exploits this hook to address the following issue: if 'next' has a
|
* exploits this hook to address the following issue: if 'next' has a
|
||||||
* fifo_time lower that rq, then the fifo_time of rq must be set to
|
* fifo_time lower that rq, then the fifo_time of rq must be set to
|
||||||
* the value of 'next', to not forget the greater age of 'next'.
|
* the value of 'next', to not forget the greater age of 'next'.
|
||||||
* Moreover 'next' may be in a bfq_queue, in this case it must be
|
|
||||||
* removed.
|
|
||||||
*
|
*
|
||||||
* NOTE: in this function we assume that rq is in a bfq_queue, basing
|
* NOTE: in this function we assume that rq is in a bfq_queue, basing
|
||||||
* on that rq is picked from the hash table q->elevator->hash, which,
|
* on that rq is picked from the hash table q->elevator->hash, which,
|
||||||
|
@ -1881,11 +1879,6 @@ static void bfq_requests_merged(struct request_queue *q, struct request *rq,
|
||||||
if (bfqq->next_rq == next)
|
if (bfqq->next_rq == next)
|
||||||
bfqq->next_rq = rq;
|
bfqq->next_rq = rq;
|
||||||
|
|
||||||
if (!RB_EMPTY_NODE(&next->rb_node)) {
|
|
||||||
bfq_remove_request(q, next);
|
|
||||||
bfqg_stats_update_io_remove(bfqq_group(bfqq), next->cmd_flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
bfqg_stats_update_io_merged(bfqq_group(bfqq), next->cmd_flags);
|
bfqg_stats_update_io_merged(bfqq_group(bfqq), next->cmd_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue