> @@ -687,12 +688,8 @@ int sd_zbc_read_zones(struct scsi_disk *sdkp, unsigned
> char *buf)
> * Check zone size: only devices with a constant zone size (except
> * an eventual last runt zone) that is a power of 2 are supported.
> */
> - zone_blocks = sd_zbc_check_zones(sdkp);
> - ret = -EFBIG;
> - if (zone_blocks != (u32)zone_blocks)
> - goto err;
> - ret = zone_blocks;
> - if (ret < 0)
> + ret = sd_zbc_check_zones(sdkp, &zone_blocks);
> + if (ret != 0)
This coud be simplified to
if (ret)
or just keep the old
if (ret < 0)
which would still work.
Otherwise looks fine:
Reviewed-by: Christoph Hellwig <[email protected]>