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.
2 parents 11ad59a + 49a1563 commit d3db2cdCopy full SHA for d3db2cd
drivers/block/null_blk/main.c
@@ -2049,8 +2049,8 @@ static int null_validate_conf(struct nullb_device *dev)
2049
return -EINVAL;
2050
}
2051
2052
- dev->blocksize = round_down(dev->blocksize, 512);
2053
- dev->blocksize = clamp_t(unsigned int, dev->blocksize, 512, 4096);
+ if (blk_validate_block_size(dev->blocksize))
+ return -EINVAL;
2054
2055
if (dev->queue_mode == NULL_Q_MQ && dev->use_per_node_hctx) {
2056
if (dev->submit_queues != nr_online_nodes)
0 commit comments