Skip to content

Commit 4ac9056

Browse files
damien-lemoalaxboe
authored andcommitted
null_blk: Do not set disk->nr_zones
In null_register_zoned_dev(), there is no need to set disk->nr_zones as the now uncoditional call to blk_revalidate_disk_zones() will do that. So remove the assignment using bdev_nr_zones(). Signed-off-by: Damien Le Moal <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 5f9bbea commit 4ac9056

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/block/null_blk/zoned.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ int null_register_zoned_dev(struct nullb *nullb)
171171
struct request_queue *q = nullb->q;
172172
struct gendisk *disk = nullb->disk;
173173

174-
disk->nr_zones = bdev_nr_zones(disk->part0);
175-
176174
pr_info("%s: using %s zone append\n",
177175
disk->disk_name,
178176
queue_emulates_zone_append(q) ? "emulated" : "native");

0 commit comments

Comments
 (0)