Commit e89d6759 authored by Yijing Wang's avatar Yijing Wang Committed by Jens Axboe

bcache: Remove redundant set_capacity

set_capacity() has been called in bcache_device_init(),
remove the redundant one.
Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
Reviewed-by: default avatarEric Wheeler <bcache@linux.ewheeler.net>
Acked-by: default avatarColy Li <colyli@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1dbe32ad
...@@ -1142,9 +1142,6 @@ static int cached_dev_init(struct cached_dev *dc, unsigned block_size) ...@@ -1142,9 +1142,6 @@ static int cached_dev_init(struct cached_dev *dc, unsigned block_size)
if (ret) if (ret)
return ret; return ret;
set_capacity(dc->disk.disk,
dc->bdev->bd_part->nr_sects - dc->sb.data_offset);
dc->disk.disk->queue->backing_dev_info->ra_pages = dc->disk.disk->queue->backing_dev_info->ra_pages =
max(dc->disk.disk->queue->backing_dev_info->ra_pages, max(dc->disk.disk->queue->backing_dev_info->ra_pages,
q->backing_dev_info->ra_pages); q->backing_dev_info->ra_pages);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment