summaryrefslogtreecommitdiff
path: root/block/bdev.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2025-01-10 14:24:17 +1000
committerDave Airlie <airlied@redhat.com>2025-01-10 14:24:17 +1000
commitf6001870edeabf0f7bc0460303d0cdbb9f0b3bc4 (patch)
treeacda60340b486b9893d96b864617f66286a4c3c6 /block/bdev.c
parent6ec692d6a5f3ab916133e2c25fa9925862210de0 (diff)
parent9d89551994a430b50c4fffcb1e617a057fa76e20 (diff)
downloadlinux-next-f6001870edeabf0f7bc0460303d0cdbb9f0b3bc4.tar.gz
linux-next-f6001870edeabf0f7bc0460303d0cdbb9f0b3bc4.zip
Merge tag 'v6.13-rc6' into drm-next
This backmerges Linux 6.13-rc6 this is need for the newer pulls. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'block/bdev.c')
-rw-r--r--block/bdev.c3
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 */