blk-mq: remove unncessary error count and commit in blk_mq_plug_issue_direct
authorKemeng Shi <shikemeng@huaweicloud.com>
Wed, 18 Jan 2023 09:37:20 +0000 (17:37 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 Feb 2023 16:22:28 +0000 (09:22 -0700)
commit0d617a83e8d4d3149d76cc074d9779a3b0ee7baf
tree8fb8edace226c7f63d664b49077119d76a417d5b
parent34c9f547402f11c0241a44800574ec4fa38cccb8
blk-mq: remove unncessary error count and commit in blk_mq_plug_issue_direct

We need only to explicitly commit in two error cases:
 -did not queue everything initially scheduled to queue
 -the last attempt to queue a request failed
(see comment of blk_mq_commit_rqs for more details).
Both cases can be checked with ret of last request which breaks list walk.
Remove unnecessary error count and unnecessary commit triggered by error
which is not covered by cases described above.

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