]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: set the type of max_zeroout to unsigned int to avoid overflow
authorBaokun Li <libaokun1@huawei.com>
Tue, 19 Mar 2024 11:33:24 +0000 (19:33 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 3 May 2024 03:48:31 +0000 (23:48 -0400)
commit261341a932d9244cbcd372a3659428c8723e5a49
treeeccf833527137054e5070939db36824e0f472517
parent9a9f3a9842927e4af7ca10c19c94dad83bebd713
ext4: set the type of max_zeroout to unsigned int to avoid overflow

The max_zeroout is of type int and the s_extent_max_zeroout_kb is of
type uint, and the s_extent_max_zeroout_kb can be freely modified via
the sysfs interface. When the block size is 1024, max_zeroout may
overflow, so declare it as unsigned int to avoid overflow.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240319113325.3110393-9-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c