Lines Matching refs:dqp

103 static inline void xfs_dqflock(struct xfs_dquot *dqp)  in xfs_dqflock()  argument
105 wait_for_completion(&dqp->q_flush); in xfs_dqflock()
108 static inline bool xfs_dqflock_nowait(struct xfs_dquot *dqp) in xfs_dqflock_nowait() argument
110 return try_wait_for_completion(&dqp->q_flush); in xfs_dqflock_nowait()
113 static inline void xfs_dqfunlock(struct xfs_dquot *dqp) in xfs_dqfunlock() argument
115 complete(&dqp->q_flush); in xfs_dqfunlock()
118 static inline int xfs_dqlock_nowait(struct xfs_dquot *dqp) in xfs_dqlock_nowait() argument
120 return mutex_trylock(&dqp->q_qlock); in xfs_dqlock_nowait()
123 static inline void xfs_dqlock(struct xfs_dquot *dqp) in xfs_dqlock() argument
125 mutex_lock(&dqp->q_qlock); in xfs_dqlock()
128 static inline void xfs_dqunlock(struct xfs_dquot *dqp) in xfs_dqunlock() argument
130 mutex_unlock(&dqp->q_qlock); in xfs_dqunlock()
134 xfs_dquot_type(const struct xfs_dquot *dqp) in xfs_dquot_type() argument
136 return dqp->q_type & XFS_DQTYPE_REC_MASK; in xfs_dquot_type()
172 const struct xfs_dquot *dqp) in xfs_dquot_is_enforced() argument
174 switch (xfs_dquot_type(dqp)) { in xfs_dquot_is_enforced()
176 return XFS_IS_UQUOTA_ENFORCED(dqp->q_mount); in xfs_dquot_is_enforced()
178 return XFS_IS_GQUOTA_ENFORCED(dqp->q_mount); in xfs_dquot_is_enforced()
180 return XFS_IS_PQUOTA_ENFORCED(dqp->q_mount); in xfs_dquot_is_enforced()
190 static inline bool xfs_dquot_lowsp(struct xfs_dquot *dqp) in xfs_dquot_lowsp() argument
194 freesp = dqp->q_blk.hardlimit - dqp->q_blk.reserved; in xfs_dquot_lowsp()
195 if (freesp < dqp->q_low_space[XFS_QLOWSP_1_PCNT]) in xfs_dquot_lowsp()
201 void xfs_dquot_to_disk(struct xfs_disk_dquot *ddqp, struct xfs_dquot *dqp);
203 #define XFS_DQ_IS_LOCKED(dqp) (mutex_is_locked(&((dqp)->q_qlock))) argument
204 #define XFS_DQ_IS_DIRTY(dqp) ((dqp)->q_flags & XFS_DQFLAG_DIRTY) argument
206 void xfs_qm_dqdestroy(struct xfs_dquot *dqp);
207 int xfs_qm_dqflush(struct xfs_dquot *dqp, struct xfs_buf **bpp);
208 void xfs_qm_dqunpin_wait(struct xfs_dquot *dqp);
223 void xfs_qm_dqput(struct xfs_dquot *dqp);
230 static inline struct xfs_dquot *xfs_qm_dqhold(struct xfs_dquot *dqp) in xfs_qm_dqhold() argument
232 xfs_dqlock(dqp); in xfs_qm_dqhold()
233 dqp->q_nrefs++; in xfs_qm_dqhold()
234 xfs_dqunlock(dqp); in xfs_qm_dqhold()
235 return dqp; in xfs_qm_dqhold()