summaryrefslogtreecommitdiff
path: root/drivers/block/null_blk
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2023-07-11 12:15:15 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2023-07-11 12:15:15 -0400
commite96277a570cda96f1363a051b6a1a321f2ec2d35 (patch)
tree324e75dd9ac42ccadb409dfa9ae0268646dc5e05 /drivers/block/null_blk
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff)
parenta97ccaa4f04396c594c25877fd2b78cc5baea4ed (diff)
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;
}