/* This is to be called when an item is unlocked that may have been in the AIL. It will wake up the first member of the AIL wait list if this item's unlocking might allow it to progress. If the item is in the AIL, then we need to get the AIL lock while doing our checking so we don't race with someone going to sleep waiting for this event in xfs_trans_push_ail().  */
void xfs_trans_unlocked_item(struct xfs_ail *ailp, xfs_log_item_t *lip)
/* This is to be called when an item is unlocked that may have been in the AIL. It will wake up the first member of the AIL wait list if this item's unlocking might allow it to progress. If the item is in the AIL, then we need to get the AIL lock while doing our checking so we don't race with someone going to sleep waiting for this event in xfs_trans_push_ail().  */
void xfs_trans_unlocked_item(struct xfs_ail *ailp, xfs_log_item_t *lip)
{
	xfs_log_item_t	*min_lip;
	if (!(lip->li_flags & XFS_LI_IN_AIL) ||
	    XFS_FORCED_SHUTDOWN(ailp->xa_mount)) {
		return;
	}
	min_lip = xfs_ail_min(ailp);
	if (min_lip == lip)
		xfs_log_move_tail(ailp->xa_mount, 1);
}