summaryrefslogtreecommitdiffstats
path: root/block/blk-zoned.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-08-05 11:12:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-05 11:12:34 -0700
commit060a72a268577cf27733d9e8eb03b3ca427f45e6 (patch)
tree678e856f5de82a5ef5401e01e6d36725611e88d9 /block/blk-zoned.c
parent22fcffebedf0a208f97dbf9d898c53b844ff153d (diff)
parent1a1206dc4cf02cee4b5cbce583ee4c22368b4c28 (diff)
downloadlinux-060a72a268577cf27733d9e8eb03b3ca427f45e6.tar.bz2
Merge tag 'for-5.9/block-merge-20200804' of git://git.kernel.dk/linux-block
Pull block stacking updates from Jens Axboe: "The stacking related fixes depended on both the core block and drivers branches, so here's a topic branch with that change. Outside of that, a late fix from Johannes for zone revalidation" * tag 'for-5.9/block-merge-20200804' of git://git.kernel.dk/linux-block: block: don't do revalidate zones on invalid devices block: remove blk_queue_stack_limits block: remove bdev_stack_limits block: inherit the zoned characteristics in blk_stack_limits
Diffstat (limited to 'block/blk-zoned.c')
-rw-r--r--block/blk-zoned.c3
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.