/* This routine is called to allocate an "extent free done" log item that will hold nextents worth of extents. The caller must use all nextents extents, because we are not flexible about this at all.  */
xfs_efd_log_item_t* xfs_trans_get_efd(xfs_trans_t *tp, xfs_efi_log_item_t *efip, uint nextents)
/* This routine is called to allocate an "extent free done" log item that will hold nextents worth of extents. The caller must use all nextents extents, because we are not flexible about this at all.  */
xfs_efd_log_item_t* xfs_trans_get_efd(xfs_trans_t *tp, xfs_efi_log_item_t *efip, uint nextents)
{
	xfs_efd_log_item_t	*efdp;
	ASSERT(tp != NULL);
	ASSERT(nextents > 0);
	efdp = xfs_efd_init(tp->t_mountp, efip, nextents);
	ASSERT(efdp != NULL);
	(void) xfs_trans_add_item(tp, (xfs_log_item_t*)efdp);
	return (efdp);
}