Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39726be2 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Tim Shimmin
Browse files

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



SGI-PV: 966145
SGI-Modid: xfs-linux-melb:xfs-kern:28889a

Signed-off-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarDavid Chinner <dgc@sgi.com>
Signed-off-by: default avatarTim Shimmin <tes@sgi.com>
parent 516b2e7c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;