md: factor out a helper rdev_is_spare() from remove_and_add_spares()
authorYu Kuai <yukuai3@huawei.com>
Fri, 25 Aug 2023 03:16:20 +0000 (11:16 +0800)
committerSong Liu <song@kernel.org>
Fri, 22 Sep 2023 17:28:25 +0000 (10:28 -0700)
commitb172a0704d0ddea3a55f3633f8249c3ce7d960bc
treeed1b18dc239c7b74e64426d2290a5e86f0de94a7
parent3389d57f97531efe9e285a0740c9b767d6f29f6c
md: factor out a helper rdev_is_spare() from remove_and_add_spares()

There are no functional changes, just to make the code simpler and
prepare to delay remove_and_add_spares() to md_start_sync().

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/20230825031622.1530464-6-yukuai1@huaweicloud.com
drivers/md/md.c