ext4: Fix mballoc BUG when running compilebench From: Aneesh Kumar K.V This fix the mballoc bug when running compile bench. Instead of using direct division even though the arguments are 32 bits we retain do_div. This would be needed if we move to 64 bit logical block number. Signed-off-by: Aneesh Kumar K.V --- fs/ext4/mballoc.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index fe7cf9e..8467b3d 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -3089,13 +3089,14 @@ static void ext4_mb_normalize_request(struct ext4_allocation_context *ac, } } if (wind == 0) { + __u64 tstart; /* file is quite large, we now preallocate with * the biggest configured window with regart to * logical offset */ wind = sbi->s_mb_prealloc_table[i - 1]; - start = ac->ac_o_ex.fe_logical; - do_div(start, wind); - start = start * wind; + tstart = ac->ac_o_ex.fe_logical; + do_div(tstart, wind); + start = tstart * wind; } size = wind; orig_size = size;