Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de171cb9 authored by NeilBrown's avatar NeilBrown
Browse files

md: revert change to raid_disks on failure.



If we try to update_raid_disks and it fails, we should put
'delta_disks' back to zero.  This is important because some code,
such as slot_store, assumes that delta_disks has been validated.

Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 1f0324ca
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5578,6 +5578,8 @@ static int update_raid_disks(mddev_t *mddev, int raid_disks)
	mddev->delta_disks = raid_disks - mddev->raid_disks;

	rv = mddev->pers->check_reshape(mddev);
	if (rv < 0)
		mddev->delta_disks = 0;
	return rv;
}