/* Now that the traversal is complete, we need to remove the cursor from the list of traversing cursors. Avoid removing the embedded push cursor, but use the fact it is always present to make the list deletion simple.  */
void xfs_trans_ail_cursor_done(struct xfs_ail *ailp, struct xfs_ail_cursor *done)
/* Now that the traversal is complete, we need to remove the cursor from the list of traversing cursors. Avoid removing the embedded push cursor, but use the fact it is always present to make the list deletion simple.  */
void xfs_trans_ail_cursor_done(struct xfs_ail *ailp, struct xfs_ail_cursor *done)
{
	struct xfs_ail_cursor	*prev = NULL;
	struct xfs_ail_cursor	*cur;
	done->item = NULL;
	if (done == &ailp->xa_cursors)
		return;
	prev = &ailp->xa_cursors;
	for (cur = prev->next; cur; prev = cur, cur = prev->next) {
		if (cur == done) {
			prev->next = cur->next;
			break;
		}
	}
	ASSERT(cur);
}