summaryrefslogtreecommitdiffstats
path: root/drivers/block/null_blk
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2023-07-11 18:15:15 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2023-07-11 18:15:15 +0200
commite96277a570cda96f1363a051b6a1a321f2ec2d35 (patch)
tree324e75dd9ac42ccadb409dfa9ae0268646dc5e05 /drivers/block/null_blk
parentLinux 6.5-rc1 (diff)
parentMerge patch series "Improve checks in blk_revalidate_disk_zones()" (diff)
downloadlinux-e96277a570cda96f1363a051b6a1a321f2ec2d35.tar.xz
linux-e96277a570cda96f1363a051b6a1a321f2ec2d35.zip
Merge branch '6.5/scsi-staging' into 6.5/scsi-fixes
Pull in the currently staged SCSI fixes for 6.5. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/block/null_blk')
-rw-r--r--drivers/block/null_blk/zoned.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/block/null_blk/zoned.c b/drivers/block/null_blk/zoned.c
index 635ce0648133..55c5b48bc276 100644
--- a/drivers/block/null_blk/zoned.c
+++ b/drivers/block/null_blk/zoned.c
@@ -162,21 +162,15 @@ int null_register_zoned_dev(struct nullb *nullb)
disk_set_zoned(nullb->disk, BLK_ZONED_HM);
blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, q);
blk_queue_required_elevator_features(q, ELEVATOR_F_ZBD_SEQ_WRITE);
-
- if (queue_is_mq(q)) {
- int ret = blk_revalidate_disk_zones(nullb->disk, NULL);
-
- if (ret)
- return ret;
- } else {
- blk_queue_chunk_sectors(q, dev->zone_size_sects);
- nullb->disk->nr_zones = bdev_nr_zones(nullb->disk->part0);
- }
-
+ blk_queue_chunk_sectors(q, dev->zone_size_sects);
+ nullb->disk->nr_zones = bdev_nr_zones(nullb->disk->part0);
blk_queue_max_zone_append_sectors(q, dev->zone_size_sects);
disk_set_max_open_zones(nullb->disk, dev->zone_max_open);
disk_set_max_active_zones(nullb->disk, dev->zone_max_active);
+ if (queue_is_mq(q))
+ return blk_revalidate_disk_zones(nullb->disk, NULL);
+
return 0;
}