linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] bcache: Remove redundant set_capacity
@ 2016-11-25  1:39 Yijing Wang
  2016-11-27  7:57 ` Coly Li
  2016-11-29 20:49 ` Eric Wheeler
  0 siblings, 2 replies; 9+ messages in thread
From: Yijing Wang @ 2016-11-25  1:39 UTC (permalink / raw)
  To: axboe, kent.overstreet
  Cc: git, colyli, linux-bcache, linux-kernel, Yijing Wang

set_capacity() has been called in bcache_device_init(),
remove the redundant one.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
 drivers/md/bcache/super.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 849ad44..b638a16 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1126,9 +1126,6 @@ static int cached_dev_init(struct cached_dev *dc, unsigned block_size)
 	if (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 =
 		max(dc->disk.disk->queue->backing_dev_info.ra_pages,
 		    q->backing_dev_info.ra_pages);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-12-02  0:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-25  1:39 [PATCH 1/2] bcache: Remove redundant set_capacity Yijing Wang
2016-11-27  7:57 ` Coly Li
2016-11-28  0:51   ` wangyijing
2016-11-29 20:49 ` Eric Wheeler
2016-11-30  2:00   ` wangyijing
2016-11-30 18:34     ` Eric Wheeler
2016-12-01  9:24       ` wangyijing
2016-12-01 22:02         ` Eric Wheeler
2016-12-02  0:54           ` wangyijing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).