/* Invalidate any cursor that is pointing to this item. This is called when an item is removed from the AIL. Any cursor pointing to this object is now invalid and the traversal needs to be terminated so it doesn't reference a freed object. We set the cursor item to a value of 1 so we can distinguish between an invalidation and the end of the list when getting the next item from the cursor.  */
STATIC void xfs_trans_ail_cursor_clear(struct xfs_ail *ailp, struct xfs_log_item *lip)
/* Invalidate any cursor that is pointing to this item. This is called when an item is removed from the AIL. Any cursor pointing to this object is now invalid and the traversal needs to be terminated so it doesn't reference a freed object. We set the cursor item to a value of 1 so we can distinguish between an invalidation and the end of the list when getting the next item from the cursor.  */
STATIC void xfs_trans_ail_cursor_clear(struct xfs_ail *ailp, struct xfs_log_item *lip)
{
	struct xfs_ail_cursor	*cur;
	for (cur = &ailp->xa_cursors; cur; cur = cur->next) {
		if (cur->item == lip)
			cur->item = (struct xfs_log_item *)
					((__psint_t)cur->item | 1);
	}
}