summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-05 08:39:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-05 08:39:02 +0300
commitd37537a1f7cf09e304fe7993cb5e732534a0fb22 (patch)
treef9894c8e18496941e28499b7fc1ccb01569db526 /block
parent243ff7e6a03533fd5f34036b4a2c297d844ffdc0 (diff)
parent9561de3a55bed6bdd44a12820ba81ec416e705a7 (diff)
downloadlinux-d37537a1f7cf09e304fe7993cb5e732534a0fb22.tar.xz
Merge 6.4-rc5 into usb-next
We need the USB fixes in here are well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r--block/blk-settings.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 896b4654ab00..4dd59059b788 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -915,6 +915,7 @@ static bool disk_has_partitions(struct gendisk *disk)
void disk_set_zoned(struct gendisk *disk, enum blk_zoned_model model)
{
struct request_queue *q = disk->queue;
+ unsigned int old_model = q->limits.zoned;
switch (model) {
case BLK_ZONED_HM:
@@ -952,7 +953,7 @@ void disk_set_zoned(struct gendisk *disk, enum blk_zoned_model model)
*/
blk_queue_zone_write_granularity(q,
queue_logical_block_size(q));
- } else {
+ } else if (old_model != BLK_ZONED_NONE) {
disk_clear_zone_settings(disk);
}
}