/* This is the iodone() function for buffers which have been logged. It is called when they are eventually flushed out. It should remove the buf item from the AIL, and free the buf item. It is called by xfs_buf_iodone_callbacks() above which will take care of cleaning up the buffer itself.  */
void xfs_buf_iodone(xfs_buf_t *bp, xfs_buf_log_item_t *bip)
/* This is the iodone() function for buffers which have been logged. It is called when they are eventually flushed out. It should remove the buf item from the AIL, and free the buf item. It is called by xfs_buf_iodone_callbacks() above which will take care of cleaning up the buffer itself.  */
void xfs_buf_iodone(xfs_buf_t *bp, xfs_buf_log_item_t *bip)
{
	struct xfs_ail		*ailp = bip->bli_item.li_ailp;
	ASSERT(bip->bli_buf == bp);
	xfs_buf_rele(bp);
	spin_lock(&ailp->xa_lock);
	xfs_trans_ail_delete(ailp, (xfs_log_item_t *)bip);
	xfs_buf_item_free(bip);
}