aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 2dc35b4c20ac..2b521ee67dfa 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4858,6 +4858,7 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors)
4858 return -EINVAL; 4858 return -EINVAL;
4859 set_capacity(mddev->gendisk, mddev->array_sectors); 4859 set_capacity(mddev->gendisk, mddev->array_sectors);
4860 mddev->changed = 1; 4860 mddev->changed = 1;
4861 revalidate_disk(mddev->gendisk);
4861 if (sectors > mddev->dev_sectors && mddev->recovery_cp == MaxSector) { 4862 if (sectors > mddev->dev_sectors && mddev->recovery_cp == MaxSector) {
4862 mddev->recovery_cp = mddev->dev_sectors; 4863 mddev->recovery_cp = mddev->dev_sectors;
4863 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 4864 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
@@ -5058,7 +5059,6 @@ static void end_reshape(raid5_conf_t *conf)
5058 */ 5059 */
5059static void raid5_finish_reshape(mddev_t *mddev) 5060static void raid5_finish_reshape(mddev_t *mddev)
5060{ 5061{
5061 struct block_device *bdev;
5062 raid5_conf_t *conf = mddev->private; 5062 raid5_conf_t *conf = mddev->private;
5063 5063
5064 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { 5064 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
@@ -5067,15 +5067,7 @@ static void raid5_finish_reshape(mddev_t *mddev)
5067 md_set_array_sectors(mddev, raid5_size(mddev, 0, 0)); 5067 md_set_array_sectors(mddev, raid5_size(mddev, 0, 0));
5068 set_capacity(mddev->gendisk, mddev->array_sectors); 5068 set_capacity(mddev->gendisk, mddev->array_sectors);
5069 mddev->changed = 1; 5069 mddev->changed = 1;
5070 5070 revalidate_disk(mddev->gendisk);
5071 bdev = bdget_disk(mddev->gendisk, 0);
5072 if (bdev) {
5073 mutex_lock(&bdev->bd_inode->i_mutex);
5074 i_size_write(bdev->bd_inode,
5075 (loff_t)mddev->array_sectors << 9);
5076 mutex_unlock(&bdev->bd_inode->i_mutex);
5077 bdput(bdev);
5078 }
5079 } else { 5071 } else {
5080 int d; 5072 int d;
5081 mddev->degraded = conf->raid_disks; 5073 mddev->degraded = conf->raid_disks;