From: Christoph Hellwig Date: Mon, 18 Jun 2007 07:57:45 +0000 (+1000) Subject: [XFS] Use do_div() on 64 bit types. X-Git-Tag: v2.6.23-rc1~1056^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39726be2a2e6e61f352852da2c3a807773e33346;p=linux-2.6 [XFS] Use do_div() on 64 bit types. SGI-PV: 966145 SGI-Modid: xfs-linux-melb:xfs-kern:28889a Signed-off-by: Christoph Hellwig Signed-off-by: David Chinner Signed-off-by: Tim Shimmin --- diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 31453ca0f3..a66b398051 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -1154,7 +1154,9 @@ xfs_mountfs( * This may drive us straight to ENOSPC on mount, but that implies * we were already there on the last unmount. */ - resblks = min_t(__uint64_t, mp->m_sb.sb_dblocks / 20, 1024); + resblks = mp->m_sb.sb_dblocks; + do_div(resblks, 20); + resblks = min_t(__uint64_t, resblks, 1024); xfs_reserve_blocks(mp, &resblks, NULL); return 0;