We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f62e8ed commit 3710561Copy full SHA for 3710561
block/blk-settings.c
@@ -276,7 +276,7 @@ static int blk_validate_limits(struct queue_limits *lim)
276
if (lim->max_user_sectors < PAGE_SIZE / SECTOR_SIZE)
277
return -EINVAL;
278
lim->max_sectors = min(max_hw_sectors, lim->max_user_sectors);
279
- } else if (lim->io_opt) {
+ } else if (lim->io_opt > (BLK_DEF_MAX_SECTORS_CAP << SECTOR_SHIFT)) {
280
lim->max_sectors =
281
min(max_hw_sectors, lim->io_opt >> SECTOR_SHIFT);
282
} else if (lim->io_min > (BLK_DEF_MAX_SECTORS_CAP << SECTOR_SHIFT)) {
0 commit comments