Message ID | 20230918110510.66470-11-hare@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: update buffer_head for Large-block I/O | expand |
diff --git a/block/bdev.c b/block/bdev.c index f3b13aa1b7d4..adbcf7af0b56 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -137,8 +137,8 @@ static void set_init_blocksize(struct block_device *bdev) int set_blocksize(struct block_device *bdev, int size) { - /* Size must be a power of two, and between 512 and PAGE_SIZE */ - if (size > PAGE_SIZE || size < 512 || !is_power_of_2(size)) + /* Size must be a power of two, and larger than 512 */ + if (size < 512 || !is_power_of_2(size)) return -EINVAL; /* Size cannot be smaller than the size supported by the device */
We now can support blocksizes larger than PAGE_SIZE, so lift the restriction. Signed-off-by: Hannes Reinecke <hare@suse.de> --- block/bdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)