Commit 18842e0a authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Darrick J. Wong

xfs: Fix 64-bit division on 32-bit in xlog_state_switch_iclogs()

On 32-bit (e.g. m68k):

    ERROR: modpost: "__udivdi3" [fs/xfs/xfs.ko] undefined!

Fix this by using a uint32_t intermediate, like before.

Reported-by: noreply@ellerman.id.au
Fixes: 7660a5b48fbef958 ("xfs: log stripe roundoff is a property of the log")
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent a6a65fef
...@@ -3143,8 +3143,8 @@ xlog_state_switch_iclogs( ...@@ -3143,8 +3143,8 @@ xlog_state_switch_iclogs(
/* Round up to next log-sunit */ /* Round up to next log-sunit */
if (log->l_iclog_roundoff > BBSIZE) { if (log->l_iclog_roundoff > BBSIZE) {
log->l_curr_block = roundup(log->l_curr_block, uint32_t sunit_bb = BTOBB(log->l_iclog_roundoff);
BTOBB(log->l_iclog_roundoff)); log->l_curr_block = roundup(log->l_curr_block, sunit_bb);
} }
if (log->l_curr_block >= log->l_logBBsize) { if (log->l_curr_block >= log->l_logBBsize) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment