]> err.no Git - linux-2.6/commitdiff
[XFS] Use do_div() on 64 bit types.
authorChristoph Hellwig <hch@infradead.org>
Mon, 18 Jun 2007 07:57:45 +0000 (17:57 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Sat, 14 Jul 2007 05:36:08 +0000 (15:36 +1000)
SGI-PV: 966145
SGI-Modid: xfs-linux-melb:xfs-kern:28889a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/xfs_mount.c

index 31453ca0f3dd77827cd9456919bd83d4bd5fbba2..a66b398051760f3dd2695777bbb4e637e2280279 100644 (file)
@@ -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;