/* This is called to wait for the given dquot to be unpinned. Most of these pin/unpin routines are plagiarized from inode code.  */
void xfs_qm_dqunpin_wait(xfs_dquot_t *dqp)
/* This is called to wait for the given dquot to be unpinned. Most of these pin/unpin routines are plagiarized from inode code.  */
void xfs_qm_dqunpin_wait(xfs_dquot_t *dqp)
{
	ASSERT(XFS_DQ_IS_LOCKED(dqp));
	if (atomic_read(&dqp->q_pincount) == 0)
		return;
	xfs_log_force(dqp->q_mount, (xfs_lsn_t)0, XFS_LOG_FORCE);
	wait_event(dqp->q_pinwait, (atomic_read(&dqp->q_pincount) == 0));
}