Message ID | 20190821061423.3408-6-chaitanya.kulkarni@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: use right accessor to read nr_sects | expand |
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 20ed838e9413..79c848fa5912 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1305,7 +1305,7 @@ static int cached_dev_init(struct cached_dev *dc, unsigned int block_size) q->limits.raid_partial_stripes_expensive; ret = bcache_device_init(&dc->disk, block_size, - dc->bdev->bd_part->nr_sects - dc->sb.data_offset); + bdev_nr_sects(dc->bdev) - dc->sb.data_offset); if (ret) return ret;