]> git.baikalelectronics.ru Git - kernel.git/commitdiff
bfq: Remove superfluous conversion from RQ_BIC()
authorJan Kara <jack@suse.cz>
Thu, 19 May 2022 10:52:31 +0000 (12:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 19 May 2022 12:52:36 +0000 (06:52 -0600)
We store struct bfq_io_cq pointer in rq->elv.priv[0] in bfq_init_rq().
Thus a call to icq_to_bic() in RQ_BIC() is wrong. Luckily it does no
harm currently because struct io_iq is the first one in struct
bfq_io_cq.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220519105235.31397-3-jack@suse.cz
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c

index 9e1d713de9427e77c8f67d2adca6f0dd0d1a8f3a..62de9f86561073eb3ec210dee794d562fe926451 100644 (file)
@@ -374,7 +374,7 @@ static const unsigned long bfq_activation_stable_merging = 600;
  */
 static const unsigned long bfq_late_stable_merging = 600;
 
-#define RQ_BIC(rq)             icq_to_bic((rq)->elv.priv[0])
+#define RQ_BIC(rq)             ((struct bfq_io_cq *)((rq)->elv.priv[0]))
 #define RQ_BFQQ(rq)            ((rq)->elv.priv[1])
 
 struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, bool is_sync)