Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: don't return 1 for the fallback case in blkdev_get_zone_info

blkdev_do_report_zones returns the number of reported zones, but
blkdev_get_zone_info returns 0 or an errno. Translate to the expected
return value in blkdev_report_zone_fallback.

Fixes: b037d41762fd ("block: introduce blkdev_get_zone_info()")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
86a9ce21 bc840b21

+7 -1
+7 -1
block/blk-zoned.c
··· 895 895 .data = zone, 896 896 .report_active = true, 897 897 }; 898 + int error; 898 899 899 - return blkdev_do_report_zones(bdev, sector, 1, &args); 900 + error = blkdev_do_report_zones(bdev, sector, 1, &args); 901 + if (error < 0) 902 + return error; 903 + if (error == 0) 904 + return -EIO; 905 + return 0; 900 906 } 901 907 902 908 /*