set_capacity(disk, size); bdev = bdget_disk(disk, 0); if (bdev) { down(&bdev->bd_inode->i_sem); i_size_write(bdev->bd_inode, (loff_t)size << SECTOR_SHIFT); up(&bdev->bd_inode->i_sem); bdput(bdev); }
down(&md->frozen_bdev->bd_inode->i_sem); i_size_write(md->frozen_bdev->bd_inode, (loff_t)size << SECTOR_SHIFT); up(&md->frozen_bdev->bd_inode->i_sem);
static void __set_size(struct gendisk *disk, sector_t size){	struct block_device *bdev;	set_capacity(disk, size);	bdev = bdget_disk(disk, 0);	if (bdev) {		down(&bdev->bd_inode->i_sem);		i_size_write(bdev->bd_inode, (loff_t)size << SECTOR_SHIFT);		up(&bdev->bd_inode->i_sem);		bdput(bdev);	}}