Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp412683pxj; Thu, 10 Jun 2021 04:02:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHaIWm7+aH3TQG6qkLfaBWmVXrbBFUAL8y2XFqE/Fasmoj3AzIHtwI7geQFvc0t/UsNxrB X-Received: by 2002:a05:6402:35c8:: with SMTP id z8mr4076127edc.348.1623322942787; Thu, 10 Jun 2021 04:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623322942; cv=none; d=google.com; s=arc-20160816; b=M0ALBLp3Oq+Ma47G9FWukbHBfhvdg1+onFRYalc3l5gxwo1zevTVW1M+Z7MAnAzhGV RvgVeFl8XK6pwDKAaNETL36gyw6A8tMzn6yV0OyOJa61GziXE9QhCBhT8yWfenQOfosQ okYgKE0C1K2gvjhf9CQMjC9xLZ5fCCv2BZ/SlN8uN6R53ZPXm1fCCPtwOrP5rkGhPlqq foPla44GL7gqPQbR2XE64buFzF98eIP9JC2I2aXRdfdjbDHaS6if9DJQiY82qCHfWzDY LVXoP1JYNk+MUdEjPF90x94D78wU/na/rBxBlbPZtqlUdq0gpPPfkevsfwk4sgxvsvf3 BiqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ft2lm80nIm72sjg9cTmThqzeJul2GeIuwz1VmuF2wBY=; b=n7a+nxTdnjHuL+enCDzOJBnV0pOLfHBawMky3udx8DPQra505T+1XEjADm+rpraby1 pwvv4mIIY8FfnpZdN5tfY9Tq19VUWgLTDM2Z/v3TC03lgVCn4smHWHSR5EKFsDl0NKif 4SmMoDWyCS05eZQZZ1LYvVyzxjNje/r9a4higcrbRi6QuNdsNltmrlK06sA9tm2rncIr 9+N6Rh8JqJwq4uINtbcz60HZ9EJLGNjOCoPMCC5RrevvLctBY3sqofXhUV0hw0Jn7/x8 Yy787Kg0kK/CelqUJyA7d6XE8jucclT9TlahVf5cW6Djc7FnAScrdz9soQwTUHJ+iDzl VkVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si1960092ejy.671.2021.06.10.04.01.55; Thu, 10 Jun 2021 04:02:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbhFJLCF (ORCPT + 99 others); Thu, 10 Jun 2021 07:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbhFJLCD (ORCPT ); Thu, 10 Jun 2021 07:02:03 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82DBEC061574 for ; Thu, 10 Jun 2021 04:00:07 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:a946:bccb:b1a1:3055]) by xavier.telenet-ops.be with bizsmtp id FP04250060wnyou01P04UY; Thu, 10 Jun 2021 13:00:05 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lrIPr-00FF9M-Na; Thu, 10 Jun 2021 13:00:03 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1lrIPq-00Blno-SW; Thu, 10 Jun 2021 13:00:02 +0200 From: Geert Uytterhoeven To: Dave Chinner , Chandan Babu R , "Darrick J . Wong" , Allison Henderson , Christoph Hellwig Cc: linux-xfs@vger.kernel.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven , noreply@ellerman.id.au Subject: [PATCH] xfs: Fix 64-bit division on 32-bit in xlog_state_switch_iclogs() Date: Thu, 10 Jun 2021 13:00:01 +0200 Message-Id: <20210610110001.2805317-1-geert@linux-m68k.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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