From: Damien Le Moal Date: Tue, 25 May 2021 21:24:55 +0000 (+0900) Subject: dm: cleanup device_area_is_invalid() X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=dd73c320ec3089149b802a1316321c3e0f6a6aaf;p=uclinux-h8%2Flinux.git dm: cleanup device_area_is_invalid() In device_area_is_invalid(), use bdev_is_zoned() instead of open coding the test on the zoned model returned by bdev_zoned_model(). Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 7e88e5e06922..123d1a3a358e 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -249,7 +249,7 @@ static int device_area_is_invalid(struct dm_target *ti, struct dm_dev *dev, * If the target is mapped to zoned block device(s), check * that the zones are not partially mapped. */ - if (bdev_zoned_model(bdev) != BLK_ZONED_NONE) { + if (bdev_is_zoned(bdev)) { unsigned int zone_sectors = bdev_zone_sectors(bdev); if (start & (zone_sectors - 1)) {