blk-mq: remove unnecessary list_empty check in blk_mq_try_issue_list_directly
authorKemeng Shi <shikemeng@huaweicloud.com>
Wed, 18 Jan 2023 09:37:17 +0000 (17:37 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 Feb 2023 16:22:28 +0000 (09:22 -0700)
commit08e3599e7401a7eae5e68f5e2601cc4a4e53951b
tree719fe83bc55c037fe277f6cb6fda6961b9d4d910
parent47df9ce95cd568d3f84218c4f65e9fbd4dfeda55
blk-mq: remove unnecessary list_empty check in blk_mq_try_issue_list_directly

We only break the list walk if we get 'BLK_STS_*RESOURCE'. We also
count errors for 'BLK_STS_*RESOURCE' error. If list is not empty,
errors will always be non-zero. So we can remove unnecessary list_empty
check. This will remove redundant list_empty check for case that
error happened at sending last request in list.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c