diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-zoned.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 81152a260354..6817a673e5ce 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -498,6 +498,9 @@ int blk_revalidate_disk_zones(struct gendisk *disk, if (WARN_ON_ONCE(!queue_is_mq(q))) return -EIO; + if (!get_capacity(disk)) + return -EIO; + /* * Ensure that all memory allocations in this context are done as if * GFP_NOIO was specified. |