]> www.infradead.org Git - nvme.git/commit
block: Cleanup block device zone helpers
authorDamien Le Moal <dlemoal@kernel.org>
Fri, 21 Jun 2024 03:15:06 +0000 (12:15 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 21 Jun 2024 14:26:36 +0000 (08:26 -0600)
commitcaaf7101c01a91a882d3da2f566579dda692367d
tree5ebbd2c4930b2697964c487e7dbd562b4709e0b8
parentb6cfe2287df6e26d685af8a8a96ed1bf87bdde28
block: Cleanup block device zone helpers

There is no need to conditionally define on CONFIG_BLK_DEV_ZONED the
inline helper functions bdev_nr_zones(), bdev_max_open_zones(),
bdev_max_active_zones() and disk_zone_no() as these function will return
the correct valu in all cases (zoned device or not, including when
CONFIG_BLK_DEV_ZONED is not set). Furthermore, disk_nr_zones()
definition can be simplified as disk->nr_zones is always 0 for regular
block devices.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20240621031506.759397-4-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/blkdev.h