mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
DM RAID: Use safe version of rdev_for_each
Fix segfault caused by using rdev_for_each instead of rdev_for_each_safe Commit dafb20fa34320a472deb7442f25a0c086e0feb33 mistakenly replaced a safe iterator with an unsafe one when making some macro changes. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
afbaa90b80
commit
a9ad8526bb
@ -859,7 +859,7 @@ static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs)
|
||||
int ret;
|
||||
unsigned redundancy = 0;
|
||||
struct raid_dev *dev;
|
||||
struct md_rdev *rdev, *freshest;
|
||||
struct md_rdev *rdev, *tmp, *freshest;
|
||||
struct mddev *mddev = &rs->md;
|
||||
|
||||
switch (rs->raid_type->level) {
|
||||
@ -877,7 +877,7 @@ static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs)
|
||||
}
|
||||
|
||||
freshest = NULL;
|
||||
rdev_for_each(rdev, mddev) {
|
||||
rdev_for_each_safe(rdev, tmp, mddev) {
|
||||
if (!rdev->meta_bdev)
|
||||
continue;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user