diff options
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/genhd.c b/block/genhd.c index 2052aeffa39b..febaaa55125a 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -58,6 +58,7 @@ void set_capacity(struct gendisk *disk, sector_t sectors) spin_lock(&bdev->bd_size_lock); i_size_write(bdev->bd_inode, (loff_t)sectors << SECTOR_SHIFT); + bdev->bd_nr_sectors = sectors; spin_unlock(&bdev->bd_size_lock); } EXPORT_SYMBOL(set_capacity); |