Skip to content

Commit

Permalink
md/raid5: make sure reshape_position is cleared on error path.
Browse files Browse the repository at this point in the history
Leaving a valid reshape_position value in place could be confusing.

Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed Mar 13, 2012
1 parent fde7d90 commit 1e3fa9b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -5592,6 +5592,7 @@ static int raid5_start_reshape(struct mddev *mddev)
spin_lock_irq(&conf->device_lock);
mddev->raid_disks = conf->raid_disks = conf->previous_raid_disks;
conf->reshape_progress = MaxSector;
mddev->reshape_position = MaxSector;
spin_unlock_irq(&conf->device_lock);
return -EAGAIN;
}
Expand Down

0 comments on commit 1e3fa9b

Please sign in to comment.