raid5: fix missing io accounting in raid5_align_endio()
authorYu Kuai <yukuai3@huawei.com>
Wed, 21 Jun 2023 16:51:05 +0000 (00:51 +0800)
committerSong Liu <song@kernel.org>
Thu, 27 Jul 2023 07:13:29 +0000 (00:13 -0700)
commit05048cbccab79e9fb9030274170ccd710fe69474
treecf43d5507cdf230caa7a4fd7173583e0a9dab3be
parentc687297b884507a4737b747957eda567063901df
raid5: fix missing io accounting in raid5_align_endio()

Io will only be accounted as done from raid5_align_endio() if the io
succeeded, and io inflight counter will be leaked if such io failed.

Fix this problem by switching to use md_account_bio() for io accounting.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230621165110.1498313-4-yukuai1@huaweicloud.com
drivers/md/raid5.c