[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1497720913-10787-1-git-send-email-linux@roeck-us.net>
Date: Sat, 17 Jun 2017 10:35:13 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Evgeniy Dushistov <dushistov@...l.ru>
Cc: Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
Guenter Roeck <linux@...ck-us.net>,
Arnd Bergmann <arnd@...db.de>,
Al Viro <viro@...iv.linux.org.uk>
Subject: [PATCH] ufs: Fix build errors on 32 bit machines
Various 32 builds fail with error messages such as
ERROR: "__udivdi3" [fs/ufs/ufs.ko] undefined!
due to a variable type change from 32 bit to 64 bit.
Fixes: c596961d1b4c ("ufs: fix s_size/s_dsize users")
Reported-by: Arnd Bergmann <arnd@...db.de>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Al Viro <viro@...iv.linux.org.uk>
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
fs/ufs/balloc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index 0315fea1d589..a93121873fa6 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -459,7 +459,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
case UFS_OPTSPACE:
request = newcount;
if (uspi->s_minfree < 5 || uspi->cs_total.cs_nffree
- > uspi->s_dsize * uspi->s_minfree / (2 * 100))
+ > div_u64(uspi->s_dsize * uspi->s_minfree, 2 * 100))
break;
usb1->fs_optim = cpu_to_fs32(sb, UFS_OPTTIME);
break;
@@ -468,8 +468,8 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
case UFS_OPTTIME:
request = uspi->s_fpb;
- if (uspi->cs_total.cs_nffree < uspi->s_dsize *
- (uspi->s_minfree - 2) / 100)
+ if (uspi->cs_total.cs_nffree <
+ div_u64(uspi->s_dsize * (uspi->s_minfree - 2), 100))
break;
usb1->fs_optim = cpu_to_fs32(sb, UFS_OPTTIME);
break;
--
2.7.4
Powered by blists - more mailing lists