diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-07-16 03:48:31 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-07-29 06:24:14 +0300 |
commit | dbcbc7b90e8a43aa00412bfa601a2d110a29086a (patch) | |
tree | 46a20b5b78f52e98d19cf07acc40f83db71d9b72 /fs/xfs/xfs_trans_dquot.c | |
parent | 8cd4901da56caadc16b4e8d6b434291a8ce31d7c (diff) | |
download | linux-dbcbc7b90e8a43aa00412bfa601a2d110a29086a.tar.xz |
xfs: refactor testing if a particular dquot is being enforced
Create a small helper to test if enforcement is enabled for a
given incore dquot and replace the open-code logic testing.
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 | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c index ea61e279f831..d7d710d25bbd 100644 --- a/fs/xfs/xfs_trans_dquot.c +++ b/fs/xfs/xfs_trans_dquot.c @@ -650,9 +650,7 @@ xfs_trans_dqresv( } if ((flags & XFS_QMOPT_FORCE_RES) == 0 && dqp->q_id && - ((XFS_IS_UQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISUDQ(dqp)) || - (XFS_IS_GQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISGDQ(dqp)) || - (XFS_IS_PQUOTA_ENFORCED(dqp->q_mount) && XFS_QM_ISPDQ(dqp)))) { + xfs_dquot_is_enforced(dqp)) { int quota_nl; bool fatal; |