diff options
| author | Zhang Yi <[email protected]> | 2022-03-01 11:17:04 +0000 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2022-03-03 04:56:41 +0000 |
| commit | 5c93e8ecd5bd3bfdee013b6da0850357eb6ca4d8 (patch) | |
| tree | 59493b2132ac471877eb0a7d40128d3b03e040b7 /fs/ext4/fast_commit.h | |
| parent | ext4: fix ext4_mb_clear_bb() kernel-doc comment (diff) | |
| download | kernel-5c93e8ecd5bd3bfdee013b6da0850357eb6ca4d8.tar.gz kernel-5c93e8ecd5bd3bfdee013b6da0850357eb6ca4d8.zip | |
ext4: fix underflow in ext4_max_bitmap_size()
when ext4 filesystem is created with 64k block size, ^extent and
^huge_file features. the upper_limit would underflow during the
computations in ext4_max_bitmap_size(). The problem is the size of block
index tree for such large block size is more than i_blocks can carry.
So fix the computation to count with this possibility. After this fix,
the 'res' cannot overflow loff_t on the extreme case of filesystem with
huge_files and 64K block size, so this patch also revert commit
75ca6ad408f4 ("ext4: fix loff_t overflow in ext4_max_bitmap_size()").
Signed-off-by: Zhang Yi <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'fs/ext4/fast_commit.h')
0 files changed, 0 insertions, 0 deletions
