PCI: dwc: Fix inverted condition of DMA mask setup warning
[linux-2.6-microblaze.git] / block / blk-zoned.c
index 23831fa..6817a67 100644 (file)
@@ -312,6 +312,7 @@ int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode,
                return ret;
 
        rep.nr_zones = ret;
+       rep.flags = BLK_ZONE_REP_CAPACITY;
        if (copy_to_user(argp, &rep, sizeof(struct blk_zone_report)))
                return -EFAULT;
        return 0;
@@ -497,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.