ext4: improving calculation of 'fe_{len|start}' in mb_find_extent()
authorGou Hao <gouhao@uniontech.com>
Mon, 13 Nov 2023 08:26:17 +0000 (16:26 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 5 Jan 2024 04:35:55 +0000 (23:35 -0500)
commit2bf5eb2a7c22fc3dd011fda2722fd369b1c4608b
treea55b7d0c6f2e164443080ce8022e072d1d842030
parentc6bfd724098457a1162a7b9fef07af176720055b
ext4: improving calculation of 'fe_{len|start}' in mb_find_extent()

After first execution of mb_find_order_for_block():

'fe_start' is the value of 'block' passed in mb_find_extent().

'fe_len' is the difference between the length of order-chunk and
remainder of the block divided by order-chunk.

And 'next' does not require initialization after above modifications.

Signed-off-by: Gou Hao <gouhao@uniontech.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20231113082617.11258-1-gouhao@uniontech.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c