summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2021-06-10 16:00:01 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-06-12 17:12:40 -0700
commitc185e2d3b728189d55b962df1e474a893c0a83a5 (patch)
tree50c5a7624abe4b1b580561d800c35bd5cd7856c3
parent78cb6ad1c12d84732fd94ca5478762b89288b070 (diff)
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: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-rw-r--r--fs/xfs/xfs_log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 63e2358f160a..e921b554b683 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -3069,8 +3069,8 @@ xlog_state_switch_iclogs(
/* Round up to next log-sunit */
if (log->l_iclog_roundoff > BBSIZE) {
- log->l_curr_block = roundup(log->l_curr_block,
- BTOBB(log->l_iclog_roundoff));
+ uint32_t sunit_bb = BTOBB(log->l_iclog_roundoff);
+ log->l_curr_block = roundup(log->l_curr_block, sunit_bb);
}
if (log->l_curr_block >= log->l_logBBsize) {