]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
md/raid10: factor out dereference_rdev_and_rrdev()
authorLi Nan <linan122@huawei.com>
Sat, 1 Jul 2023 08:05:28 +0000 (16:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:14 +0000 (09:48 +0200)
commite26b8812a79a36fd83c9e6e18a9996e0042d2149
tree4e9a98e1cb9d0969bfacdb2a85ea53eb9f9959ab
parenta5dc1f8342fa5a28e343102a7746da7679abc3d5
md/raid10: factor out dereference_rdev_and_rrdev()

[ Upstream commit b99f8fd2d91eb734f13098aa1cf337edaca454b7 ]

Factor out a helper to get 'rdev' and 'replacement' from config->mirrors.
Just to make code cleaner and prepare to fix the bug of io loss while
'replacement' replace 'rdev'.

There is no functional change.

Signed-off-by: Li Nan <linan122@huawei.com>
Link: https://lore.kernel.org/r/20230701080529.2684932-3-linan666@huaweicloud.com
Signed-off-by: Song Liu <song@kernel.org>
Stable-dep-of: 673643490b9a ("md/raid10: use dereference_rdev_and_rrdev() to get devices")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/raid10.c