/* Note: because we don't initialise everything on reallocation out of the zone, we must ensure we nullify everything correctly before freeing the structure.  */
void xfs_ireclaim(struct xfs_inode *ip)
/* Note: because we don't initialise everything on reallocation out of the zone, we must ensure we nullify everything correctly before freeing the structure.  */
void xfs_ireclaim(struct xfs_inode *ip)
{
	struct xfs_mount	*mp = ip->i_mount;
	struct xfs_perag	*pag;
	xfs_agino_t		agino = XFS_INO_TO_AGINO(mp, ip->i_ino);
	XFS_STATS_INC(xs_ig_reclaims);
	pag = xfs_get_perag(mp, ip->i_ino);
	write_lock(&pag->pag_ici_lock);
	if (!radix_tree_delete(&pag->pag_ici_root, agino))
		ASSERT(0);
	write_unlock(&pag->pag_ici_lock);
	xfs_put_perag(mp, pag);
	xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
	xfs_qm_dqdetach(ip);
	xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
	xfs_inode_free(ip);
}