[XFS] Use do_div() on 64 bit types.

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>
This commit is contained in:
Christoph Hellwig 2007-06-18 17:57:45 +10:00 committed by Tim Shimmin
parent 516b2e7c26
commit 39726be2a2
1 changed files with 3 additions and 1 deletions

View 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;