Lines Matching defs:dqp
101 static inline void xfs_dqflock(struct xfs_dquot *dqp)
103 wait_for_completion(&dqp->q_flush);
106 static inline bool xfs_dqflock_nowait(struct xfs_dquot *dqp)
108 return try_wait_for_completion(&dqp->q_flush);
111 static inline void xfs_dqfunlock(struct xfs_dquot *dqp)
113 complete(&dqp->q_flush);
116 static inline int xfs_dqlock_nowait(struct xfs_dquot *dqp)
118 return mutex_trylock(&dqp->q_qlock);
121 static inline void xfs_dqlock(struct xfs_dquot *dqp)
123 mutex_lock(&dqp->q_qlock);
126 static inline void xfs_dqunlock(struct xfs_dquot *dqp)
128 mutex_unlock(&dqp->q_qlock);
132 xfs_dquot_type(const struct xfs_dquot *dqp)
134 return dqp->q_type & XFS_DQTYPE_REC_MASK;
170 const struct xfs_dquot *dqp)
172 switch (xfs_dquot_type(dqp)) {
174 return XFS_IS_UQUOTA_ENFORCED(dqp->q_mount);
176 return XFS_IS_GQUOTA_ENFORCED(dqp->q_mount);
178 return XFS_IS_PQUOTA_ENFORCED(dqp->q_mount);
188 static inline bool xfs_dquot_lowsp(struct xfs_dquot *dqp)
192 freesp = dqp->q_blk.hardlimit - dqp->q_blk.reserved;
193 if (freesp < dqp->q_low_space[XFS_QLOWSP_1_PCNT])
199 void xfs_dquot_to_disk(struct xfs_disk_dquot *ddqp, struct xfs_dquot *dqp);
201 #define XFS_DQ_IS_LOCKED(dqp) (mutex_is_locked(&((dqp)->q_qlock)))
202 #define XFS_DQ_IS_DIRTY(dqp) ((dqp)->q_flags & XFS_DQFLAG_DIRTY)
204 void xfs_qm_dqdestroy(struct xfs_dquot *dqp);
205 int xfs_qm_dqflush(struct xfs_dquot *dqp, struct xfs_buf **bpp);
206 void xfs_qm_dqunpin_wait(struct xfs_dquot *dqp);
221 void xfs_qm_dqput(struct xfs_dquot *dqp);
227 static inline struct xfs_dquot *xfs_qm_dqhold(struct xfs_dquot *dqp)
229 xfs_dqlock(dqp);
230 dqp->q_nrefs++;
231 xfs_dqunlock(dqp);
232 return dqp;