diff options
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index e423a16ba3c9..0302723fa21f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3460,9 +3460,9 @@ static int update_size(mddev_t *mddev, unsigned long size) | |||
3460 | 3460 | ||
3461 | bdev = bdget_disk(mddev->gendisk, 0); | 3461 | bdev = bdget_disk(mddev->gendisk, 0); |
3462 | if (bdev) { | 3462 | if (bdev) { |
3463 | down(&bdev->bd_inode->i_sem); | 3463 | mutex_lock(&bdev->bd_inode->i_mutex); |
3464 | i_size_write(bdev->bd_inode, mddev->array_size << 10); | 3464 | i_size_write(bdev->bd_inode, mddev->array_size << 10); |
3465 | up(&bdev->bd_inode->i_sem); | 3465 | mutex_unlock(&bdev->bd_inode->i_mutex); |
3466 | bdput(bdev); | 3466 | bdput(bdev); |
3467 | } | 3467 | } |
3468 | } | 3468 | } |
@@ -3486,9 +3486,9 @@ static int update_raid_disks(mddev_t *mddev, int raid_disks) | |||
3486 | 3486 | ||
3487 | bdev = bdget_disk(mddev->gendisk, 0); | 3487 | bdev = bdget_disk(mddev->gendisk, 0); |
3488 | if (bdev) { | 3488 | if (bdev) { |
3489 | down(&bdev->bd_inode->i_sem); | 3489 | mutex_lock(&bdev->bd_inode->i_mutex); |
3490 | i_size_write(bdev->bd_inode, mddev->array_size << 10); | 3490 | i_size_write(bdev->bd_inode, mddev->array_size << 10); |
3491 | up(&bdev->bd_inode->i_sem); | 3491 | mutex_unlock(&bdev->bd_inode->i_mutex); |
3492 | bdput(bdev); | 3492 | bdput(bdev); |
3493 | } | 3493 | } |
3494 | } | 3494 | } |