[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210610110001.2805317-1-geert@linux-m68k.org>
Date: Thu, 10 Jun 2021 13:00:01 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Dave Chinner <dchinner@...hat.com>,
Chandan Babu R <chandanrlinux@...il.com>,
"Darrick J . Wong" <djwong@...nel.org>,
Allison Henderson <allison.henderson@...cle.com>,
Christoph Hellwig <hch@....de>
Cc: linux-xfs@...r.kernel.org, linux-next@...r.kernel.org,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>,
noreply@...erman.id.au
Subject: [PATCH] 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@...erman.id.au
Fixes: 7660a5b48fbef958 ("xfs: log stripe roundoff is a property of the log")
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
Compile-tested only.
---
fs/xfs/xfs_log.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 0e563ff8cd3be4aa..0c91da5defee6b9f 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -3143,8 +3143,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) {
--
2.25.1
Powered by blists - more mailing lists