Commit 261341a
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>1 parent 9a9f3a9 commit 261341a
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3402 | 3402 | | |
3403 | 3403 | | |
3404 | 3404 | | |
3405 | | - | |
3406 | 3405 | | |
3407 | 3406 | | |
| 3407 | + | |
| 3408 | + | |
3408 | 3409 | | |
3409 | 3410 | | |
3410 | 3411 | | |
| |||
0 commit comments