Skip to content

Commit f62e8ed

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: remove a duplicate io_min check in blk_validate_limits
If io_min is larger than the cap, it must by definition be non-zero. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Nitesh Shetty <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 4e63aeb commit f62e8ed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

block/blk-settings.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,7 @@ static int blk_validate_limits(struct queue_limits *lim)
279279
} else if (lim->io_opt) {
280280
lim->max_sectors =
281281
min(max_hw_sectors, lim->io_opt >> SECTOR_SHIFT);
282-
} else if (lim->io_min &&
283-
lim->io_min > (BLK_DEF_MAX_SECTORS_CAP << SECTOR_SHIFT)) {
282+
} else if (lim->io_min > (BLK_DEF_MAX_SECTORS_CAP << SECTOR_SHIFT)) {
284283
lim->max_sectors =
285284
min(max_hw_sectors, lim->io_min >> SECTOR_SHIFT);
286285
} else {

0 commit comments

Comments
 (0)