mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-06 13:58:56 +07:00
md: simplify export_array()
We don't really need that for_each loop, or those MD_BUGs. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
4878e9eb88
commit
0638bb0e73
@ -2187,17 +2187,13 @@ static void kick_rdev_from_array(struct md_rdev * rdev)
|
|||||||
|
|
||||||
static void export_array(struct mddev *mddev)
|
static void export_array(struct mddev *mddev)
|
||||||
{
|
{
|
||||||
struct md_rdev *rdev, *tmp;
|
struct md_rdev *rdev;
|
||||||
|
|
||||||
rdev_for_each_safe(rdev, tmp, mddev) {
|
while (!list_empty(&mddev->disks)) {
|
||||||
if (!rdev->mddev) {
|
rdev = list_first_entry(&mddev->disks, struct md_rdev,
|
||||||
MD_BUG();
|
same_set);
|
||||||
continue;
|
|
||||||
}
|
|
||||||
kick_rdev_from_array(rdev);
|
kick_rdev_from_array(rdev);
|
||||||
}
|
}
|
||||||
if (!list_empty(&mddev->disks))
|
|
||||||
MD_BUG();
|
|
||||||
mddev->raid_disks = 0;
|
mddev->raid_disks = 0;
|
||||||
mddev->major_version = 0;
|
mddev->major_version = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user