diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2025-02-05 14:57:18 -0800 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-02-05 14:57:18 -0800 |
| commit | 9e676a024fa1fa2bd8150c2d2ba85478280353bc (patch) | |
| tree | 5cf0e1d4ab27002fcafdc7dc5bdfdd9ff3f3c9f1 /block/bdev.c | |
| parent | 357b965deba9fb71467413e473764ec4e1694d8d (diff) | |
| parent | 2014c95afecee3e76ca4a56956a936e23283f05b (diff) | |
Merge tag 'v6.14-rc1' into perf-tools-next
To get the various fixes in the current master.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'block/bdev.c')
| -rw-r--r-- | block/bdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/bdev.c b/block/bdev.c index 738e3c8457e7..9d73a8fbf7f9 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -155,8 +155,7 @@ int set_blocksize(struct file *file, int size) struct inode *inode = file->f_mapping->host; struct block_device *bdev = I_BDEV(inode); - /* Size must be a power of two, and between 512 and PAGE_SIZE */ - if (size > PAGE_SIZE || size < 512 || !is_power_of_2(size)) + if (blk_validate_block_size(size)) return -EINVAL; /* Size cannot be smaller than the size supported by the device */ |
