aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-12-03 10:39:04 +0100
committerJens Axboe <axboe@kernel.dk>2019-12-03 08:51:24 -0700
commit9b38bb4b1e6de47b379afaad2c707df639bb4dc7 (patch)
tree1bae3a4c0a4ddeccd901f976744fcc9840e067e6 /drivers/md
parentblock: remove the empty line at the end of blk-zoned.c (diff)
downloadlinux-dev-9b38bb4b1e6de47b379afaad2c707df639bb4dc7.tar.xz
linux-dev-9b38bb4b1e6de47b379afaad2c707df639bb4dc7.zip
block: simplify blkdev_nr_zones
Simplify the arguments to blkdev_nr_zones by passing a gendisk instead of the block_device and capacity. This also removes the need for __blkdev_nr_zones as all callers are outside the fast path and can deal with the additional branch. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-zoned-target.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-zoned-target.c b/drivers/md/dm-zoned-target.c
index 4574e0dedbd6..70a1063161c0 100644
--- a/drivers/md/dm-zoned-target.c
+++ b/drivers/md/dm-zoned-target.c
@@ -727,7 +727,7 @@ static int dmz_get_zoned_device(struct dm_target *ti, char *path)
dev->zone_nr_blocks = dmz_sect2blk(dev->zone_nr_sectors);
dev->zone_nr_blocks_shift = ilog2(dev->zone_nr_blocks);
- dev->nr_zones = blkdev_nr_zones(dev->bdev);
+ dev->nr_zones = blkdev_nr_zones(dev->bdev->bd_disk);
dmz->dev = dev;