diff options
author | Yu Kuai <yukuai3@huawei.com> | 2022-01-26 09:21:32 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-01-26 06:34:41 -0700 |
commit | 592ee1197f78b30bd60c87db9b6c8c045c8d8314 (patch) | |
tree | 2903dc5ef15fd9f447b3445e4b2e98be24c587c9 /drivers/nvme/host/pci.c | |
parent | 83114df32ae779df57e0af99a8ba6c3968b2ba3d (diff) | |
download | linux-592ee1197f78b30bd60c87db9b6c8c045c8d8314.tar.bz2 |
blk-mq: fix missing blk_account_io_done() in error path
If blk_mq_request_issue_directly() failed from
blk_insert_cloned_request(), the request will be accounted start.
Currently, blk_insert_cloned_request() is only called by dm, and such
request won't be accounted done by dm.
In normal path, io will be accounted start from blk_mq_bio_to_request(),
when the request is allocated, and such io will be accounted done from
__blk_mq_end_request_acct() whether it succeeded or failed. Thus add
blk_account_io_done() to fix the problem.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220126012132.3111551-1-yukuai3@huawei.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/pci.c')
0 files changed, 0 insertions, 0 deletions