/* Read in the agi to initialise the per-ag data in the mount structure  */
int xfs_ialloc_pagi_init(xfs_mount_t *mp, xfs_trans_t *tp, xfs_agnumber_t agno)
/* Read in the agi to initialise the per-ag data in the mount structure  */
int xfs_ialloc_pagi_init(xfs_mount_t *mp, xfs_trans_t *tp, xfs_agnumber_t agno)
{
	xfs_buf_t	*bp = NULL;
	int		error;
	error = xfs_ialloc_read_agi(mp, tp, agno, &bp);
	if (error)
		return error;
	if (bp)
		xfs_trans_brelse(tp, bp);
	return 0;
}