Commit ac857e0d54c84edc1fdc578153f4f728c69c0e29
Committed by
Jens Axboe
1 parent
8abfa4d6fd
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>
Showing 1 changed file with 0 additions and 7 deletions Side-by-side Diff
block/bfq-iosched.c
... | ... | @@ -1845,8 +1845,6 @@ |
1845 | 1845 | * exploits this hook to address the following issue: if 'next' has a |
1846 | 1846 | * fifo_time lower that rq, then the fifo_time of rq must be set to |
1847 | 1847 | * the value of 'next', to not forget the greater age of 'next'. |
1848 | - * Moreover 'next' may be in a bfq_queue, in this case it must be | |
1849 | - * removed. | |
1850 | 1848 | * |
1851 | 1849 | * NOTE: in this function we assume that rq is in a bfq_queue, basing |
1852 | 1850 | * on that rq is picked from the hash table q->elevator->hash, which, |
... | ... | @@ -1880,11 +1878,6 @@ |
1880 | 1878 | |
1881 | 1879 | if (bfqq->next_rq == next) |
1882 | 1880 | bfqq->next_rq = rq; |
1883 | - | |
1884 | - if (!RB_EMPTY_NODE(&next->rb_node)) { | |
1885 | - bfq_remove_request(q, next); | |
1886 | - bfqg_stats_update_io_remove(bfqq_group(bfqq), next->cmd_flags); | |
1887 | - } | |
1888 | 1881 | |
1889 | 1882 | bfqg_stats_update_io_merged(bfqq_group(bfqq), next->cmd_flags); |
1890 | 1883 | } |