block: simplify blkdev_nr_zones
authorChristoph Hellwig <hch@lst.de>
Tue, 3 Dec 2019 09:39:04 +0000 (10:39 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 3 Dec 2019 15:51:24 +0000 (08:51 -0700)
commit9b38bb4b1e6de47b379afaad2c707df639bb4dc7
tree1bae3a4c0a4ddeccd901f976744fcc9840e067e6
parentbb55628288fcd96d919a9ecc59dd26704a65493b
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>
block/blk-zoned.c
block/ioctl.c
drivers/md/dm-zoned-target.c
include/linux/blkdev.h