提交 616abaea 编写于 作者: Z Zhang Yi 提交者: Zheng Zengkai

ext4: convert DIV_ROUND_UP to DIV_ROUND_UP_ULL

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4VAQC?from=project-issue
CVE: NA

--------------------------------

Fix a compile error on arm32 architecture.

 build failed: arm, allmodconfig

 ERROR: modpost: "__aeabi_ldivmod" [fs/ext4/ext4.ko] undefined!
 make[1]: *** [modules-only.symvers] Error 1
 make[1]: *** Deleting file 'modules-only.symvers'
 make: *** [modules] Error 2

Fixes: 356efe60 ("ext4: fix underflow in ext4_max_bitmap_size()")
Signed-off-by: NZhang Yi <yi.zhang@huawei.com>
Reviewed-by: NYang Erkun <yangerkun@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 c204a7a4
...@@ -3274,15 +3274,15 @@ static loff_t ext4_max_bitmap_size(int bits, int has_huge_files) ...@@ -3274,15 +3274,15 @@ static loff_t ext4_max_bitmap_size(int bits, int has_huge_files)
upper_limit -= ppb; upper_limit -= ppb;
/* double indirect blocks */ /* double indirect blocks */
if (upper_limit < ppb * ppb) { if (upper_limit < ppb * ppb) {
meta_blocks += 1 + DIV_ROUND_UP(upper_limit, ppb); meta_blocks += 1 + DIV_ROUND_UP_ULL(upper_limit, ppb);
res -= meta_blocks; res -= meta_blocks;
goto check_lfs; goto check_lfs;
} }
meta_blocks += 1 + ppb; meta_blocks += 1 + ppb;
upper_limit -= ppb * ppb; upper_limit -= ppb * ppb;
/* tripple indirect blocks for the rest */ /* tripple indirect blocks for the rest */
meta_blocks += 1 + DIV_ROUND_UP(upper_limit, ppb) + meta_blocks += 1 + DIV_ROUND_UP_ULL(upper_limit, ppb) +
DIV_ROUND_UP(upper_limit, ppb*ppb); DIV_ROUND_UP_ULL(upper_limit, ppb*ppb);
res -= meta_blocks; res -= meta_blocks;
check_lfs: check_lfs:
res <<= bits; res <<= bits;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册