Lines Matching defs:dqp

103 static inline void xfs_dqflock(struct xfs_dquot *dqp)
105 wait_for_completion(&dqp->q_flush);
108 static inline bool xfs_dqflock_nowait(struct xfs_dquot *dqp)
110 return try_wait_for_completion(&dqp->q_flush);
113 static inline void xfs_dqfunlock(struct xfs_dquot *dqp)
115 complete(&dqp->q_flush);
118 static inline int xfs_dqlock_nowait(struct xfs_dquot *dqp)
120 return mutex_trylock(&dqp->q_qlock);
123 static inline void xfs_dqlock(struct xfs_dquot *dqp)
125 mutex_lock(&dqp->q_qlock);
128 static inline void xfs_dqunlock(struct xfs_dquot *dqp)
130 mutex_unlock(&dqp->q_qlock);
134 xfs_dquot_type(const struct xfs_dquot *dqp)
136 return dqp->q_type & XFS_DQTYPE_REC_MASK;
172 const struct xfs_dquot *dqp)
174 switch (xfs_dquot_type(dqp)) {
176 return XFS_IS_UQUOTA_ENFORCED(dqp->q_mount);
178 return XFS_IS_GQUOTA_ENFORCED(dqp->q_mount);
180 return XFS_IS_PQUOTA_ENFORCED(dqp->q_mount);
190 static inline bool xfs_dquot_lowsp(struct xfs_dquot *dqp)
194 freesp = dqp->q_blk.hardlimit - dqp->q_blk.reserved;
195 if (freesp < dqp->q_low_space[XFS_QLOWSP_1_PCNT])
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)))
204 #define XFS_DQ_IS_DIRTY(dqp) ((dqp)->q_flags & XFS_DQFLAG_DIRTY)
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);
229 static inline struct xfs_dquot *xfs_qm_dqhold(struct xfs_dquot *dqp)
231 xfs_dqlock(dqp);
232 dqp->q_nrefs++;
233 xfs_dqunlock(dqp);
234 return dqp;