diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-07-16 02:47:13 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-07-29 05:24:14 +0200 |
commit | 00a342e4965ee91fff06e01949fa27db53c0bb1c (patch) | |
tree | d6f2cefa26e7978f84d946495f7b89e3a36c9a7f /fs/xfs/xfs_trans_dquot.c | |
parent | xfs: refactor testing if a particular dquot is being enforced (diff) | |
download | linux-00a342e4965ee91fff06e01949fa27db53c0bb1c.tar.xz linux-00a342e4965ee91fff06e01949fa27db53c0bb1c.zip |
xfs: remove the XFS_QM_IS[UGP]DQ macros
Remove these macros and use xfs_dquot_type() for everything.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_trans_dquot.c')
-rw-r--r-- | fs/xfs/xfs_trans_dquot.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c index d7d710d25bbd..19d3e283aafa 100644 --- a/fs/xfs/xfs_trans_dquot.c +++ b/fs/xfs/xfs_trans_dquot.c @@ -156,14 +156,19 @@ xfs_trans_get_dqtrx( int i; struct xfs_dqtrx *qa; - if (XFS_QM_ISUDQ(dqp)) + switch (xfs_dquot_type(dqp)) { + case XFS_DQTYPE_USER: qa = tp->t_dqinfo->dqs[XFS_QM_TRANS_USR]; - else if (XFS_QM_ISGDQ(dqp)) + break; + case XFS_DQTYPE_GROUP: qa = tp->t_dqinfo->dqs[XFS_QM_TRANS_GRP]; - else if (XFS_QM_ISPDQ(dqp)) + break; + case XFS_DQTYPE_PROJ: qa = tp->t_dqinfo->dqs[XFS_QM_TRANS_PRJ]; - else + break; + default: return NULL; + } for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) { if (qa[i].qt_dquot == NULL || @@ -713,7 +718,7 @@ xfs_trans_dqresv( error_return: xfs_dqunlock(dqp); - if (XFS_QM_ISPDQ(dqp)) + if (xfs_dquot_type(dqp) == XFS_DQTYPE_PROJ) return -ENOSPC; return -EDQUOT; } |