xfs: always use xfs_dquot_type when extracting type from a dquot

Always use the xfs_dquot_type helper to extract the quota type from an
incore dquot.  This moves responsibility for filtering internal state
information and whatnot to anybody passing around a struct xfs_dquot.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Darrick J. Wong
2020-07-15 17:51:47 -07:00
parent e6eb603c7e
commit 0b04dd5d7c
2 changed files with 9 additions and 8 deletions

View File

@@ -167,7 +167,7 @@ static inline bool
xfs_dquot_is_enforced(
const struct xfs_dquot *dqp)
{
switch (dqp->dq_flags & XFS_DQTYPE_REC_MASK) {
switch (xfs_dquot_type(dqp)) {
case XFS_DQTYPE_USER:
return XFS_IS_UQUOTA_ENFORCED(dqp->q_mount);
case XFS_DQTYPE_GROUP: