diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 7145cd150f7b..9fac8ac496c5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3465,7 +3465,7 @@ static int update_size(mddev_t *mddev, unsigned long size) | |||
3465 | bdev = bdget_disk(mddev->gendisk, 0); | 3465 | bdev = bdget_disk(mddev->gendisk, 0); |
3466 | if (bdev) { | 3466 | if (bdev) { |
3467 | mutex_lock(&bdev->bd_inode->i_mutex); | 3467 | mutex_lock(&bdev->bd_inode->i_mutex); |
3468 | i_size_write(bdev->bd_inode, mddev->array_size << 10); | 3468 | i_size_write(bdev->bd_inode, (loff_t)mddev->array_size << 10); |
3469 | mutex_unlock(&bdev->bd_inode->i_mutex); | 3469 | mutex_unlock(&bdev->bd_inode->i_mutex); |
3470 | bdput(bdev); | 3470 | bdput(bdev); |
3471 | } | 3471 | } |
@@ -3485,17 +3485,6 @@ static int update_raid_disks(mddev_t *mddev, int raid_disks) | |||
3485 | if (mddev->sync_thread) | 3485 | if (mddev->sync_thread) |
3486 | return -EBUSY; | 3486 | return -EBUSY; |
3487 | rv = mddev->pers->reshape(mddev, raid_disks); | 3487 | rv = mddev->pers->reshape(mddev, raid_disks); |
3488 | if (!rv) { | ||
3489 | struct block_device *bdev; | ||
3490 | |||
3491 | bdev = bdget_disk(mddev->gendisk, 0); | ||
3492 | if (bdev) { | ||
3493 | mutex_lock(&bdev->bd_inode->i_mutex); | ||
3494 | i_size_write(bdev->bd_inode, mddev->array_size << 10); | ||
3495 | mutex_unlock(&bdev->bd_inode->i_mutex); | ||
3496 | bdput(bdev); | ||
3497 | } | ||
3498 | } | ||
3499 | return rv; | 3488 | return rv; |
3500 | } | 3489 | } |
3501 | 3490 | ||