/* This is called to mark the dquot as needing to be logged when the transaction is committed. The dquot must already be associated with the given transaction. Note that it marks the entire transaction as dirty. In the ordinary case, this gets called via xfs_trans_commit, after the transaction is already dirty. However, there's nothing stop this from getting called directly, as done by xfs_qm_scall_setqlim. Hence, the TRANS_DIRTY flag.  */
void xfs_trans_log_dquot(xfs_trans_t *tp, xfs_dquot_t *dqp)
/* This is called to mark the dquot as needing to be logged when the transaction is committed. The dquot must already be associated with the given transaction. Note that it marks the entire transaction as dirty. In the ordinary case, this gets called via xfs_trans_commit, after the transaction is already dirty. However, there's nothing stop this from getting called directly, as done by xfs_qm_scall_setqlim. Hence, the TRANS_DIRTY flag.  */
void xfs_trans_log_dquot(xfs_trans_t *tp, xfs_dquot_t *dqp)
{
	xfs_log_item_desc_t	*lidp;
	ASSERT(XFS_DQ_IS_ADDEDTO_TRX(tp, dqp));
	ASSERT(XFS_DQ_IS_LOCKED(dqp));
	lidp = xfs_trans_find_item(tp, (xfs_log_item_t*)(&dqp->q_logitem));
	ASSERT(lidp != NULL);
	tp->t_flags |= XFS_TRANS_DIRTY;
	lidp->lid_flags |= XFS_LID_DIRTY;
}