/* Free up the resources associated with a mount structure. Assume that the structure was initially zeroed, so we can tell which fields got initialized.  */
STATIC void xfs_free_perag(xfs_mount_t *mp)
/* Free up the resources associated with a mount structure. Assume that the structure was initially zeroed, so we can tell which fields got initialized.  */
STATIC void xfs_free_perag(xfs_mount_t *mp)
{
	if (mp->m_perag) {
		int	agno;
		for (agno = 0; agno < mp->m_maxagi; agno++)
			if (mp->m_perag[agno].pagb_list)
				kmem_free(mp->m_perag[agno].pagb_list);
		kmem_free(mp->m_perag);
	}
}