/* Set the maximum inode count for this filesystem  */
STATIC void xfs_set_maxicount(xfs_mount_t *mp)
/* Set the maximum inode count for this filesystem  */
STATIC void xfs_set_maxicount(xfs_mount_t *mp)
{
	xfs_sb_t	*sbp = &(mp->m_sb);
	__uint64_t	icount;
	if (sbp->sb_imax_pct) {
		icount = sbp->sb_dblocks * sbp->sb_imax_pct;
		do_div(icount, 100);
		do_div(icount, mp->m_ialloc_blks);
		mp->m_maxicount = (icount * mp->m_ialloc_blks)  <<
				   sbp->sb_inopblog;
	} else {
		mp->m_maxicount = 0;
	}
}