Commit f62e8edc authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarNitesh Shetty <nj.shetty@samsung.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20240701051800.1245240-2-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4e63aeb5
......@@ -279,8 +279,7 @@ static int blk_validate_limits(struct queue_limits *lim)
} else if (lim->io_opt) {
lim->max_sectors =
min(max_hw_sectors, lim->io_opt >> SECTOR_SHIFT);
} else if (lim->io_min &&
lim->io_min > (BLK_DEF_MAX_SECTORS_CAP << SECTOR_SHIFT)) {
} else if (lim->io_min > (BLK_DEF_MAX_SECTORS_CAP << SECTOR_SHIFT)) {
lim->max_sectors =
min(max_hw_sectors, lim->io_min >> SECTOR_SHIFT);
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment