blk-mq: cleanup __blk_mq_sched_dispatch_requests
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Apr 2023 06:06:47 +0000 (08:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Apr 2023 12:57:18 +0000 (06:57 -0600)
commit89ea5ceb53d14f52ecbad8393be47f382c47c37d
tree1c95c5ce7fc34eff89bd471d89ccfb2c081fc41d
parentb12e5c6c755ae8bec44723f77f037873e3d08021
blk-mq: cleanup __blk_mq_sched_dispatch_requests

__blk_mq_sched_dispatch_requests currently has duplicated logic
for the cases where requests are on the hctx dispatch list or not.
Merge the two with a new need_dispatch variable and remove a few
pointless local variables.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20230413060651.694656-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-sched.c