md: factor out a helper rdev_addable() from remove_and_add_spares()
authorYu Kuai <yukuai3@huawei.com>
Fri, 25 Aug 2023 03:16:21 +0000 (11:16 +0800)
committerSong Liu <song@kernel.org>
Fri, 22 Sep 2023 17:28:25 +0000 (10:28 -0700)
commita0ae7e4e0bc00ae178e42391157e8ddb88b2838a
tree059043d99ccf9ba80da52874fb7d6742537fd944
parentb172a0704d0ddea3a55f3633f8249c3ce7d960bc
md: factor out a helper rdev_addable() 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>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230825031622.1530464-7-yukuai1@huaweicloud.com
drivers/md/md.c