blk-mq: refactor passthrough vs flush handling in blk_mq_insert_request
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Apr 2023 06:40:47 +0000 (08:40 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Apr 2023 12:52:30 +0000 (06:52 -0600)
commit53548d2a945eb2c277332c66f57505881392e5a9
treef57142483f2dcc18a60cec7d83ebf271d058882d
parenta4fa57ffb7671c2df4ce597d03ef9f7d6d905a60
blk-mq: refactor passthrough vs flush handling in blk_mq_insert_request

While both passthrough and flush requests call directly into
blk_mq_request_bypass_insert, the parameters aren't the same.
Split the handling into two separate conditionals and turn the whole
function into an if/elif/elif/else flow instead of the gotos.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20230413064057.707578-11-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c