aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2024-07-01 07:17:50 +0200
committerJens Axboe <[email protected]>2024-07-01 06:52:42 -0600
commitf62e8edc0a9fda84fe5bf32d5f5874b489d6c301 (patch)
tree3e9c2ffbd2ae83e4b122e490516bbe4e74384749
parent4e63aeb5d0101ddada36a2f64f048e2f9d2202fc (diff)
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]>
-rw-r--r--block/blk-settings.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 2e559cf97cc8..ff8bbc101fed 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -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 {