]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
xfs: replace a few open-coded XFS_DQTYPE_REC_MASK uses
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 16 Jul 2020 00:53:18 +0000 (17:53 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 29 Jul 2020 03:24:14 +0000 (20:24 -0700)
Fix a few places where we open-coded this mask constant.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_dquot_item_recover.c

index d7eb85c7d394d47429f8d815ca96693b5bba54f6..93178341569a7b58f64353d7502d8f28e16ad03c 100644 (file)
@@ -39,7 +39,7 @@ xlog_recover_dquot_ra_pass2(
        if (item->ri_buf[1].i_len < sizeof(struct xfs_disk_dquot))
                return;
 
-       type = recddq->d_flags & (XFS_DQTYPE_USER | XFS_DQTYPE_PROJ | XFS_DQTYPE_GROUP);
+       type = recddq->d_flags & XFS_DQTYPE_REC_MASK;
        ASSERT(type);
        if (log->l_quotaoffs_flag & type)
                return;
@@ -91,7 +91,7 @@ xlog_recover_dquot_commit_pass2(
        /*
         * This type of quotas was turned off, so ignore this record.
         */
-       type = recddq->d_flags & (XFS_DQTYPE_USER | XFS_DQTYPE_PROJ | XFS_DQTYPE_GROUP);
+       type = recddq->d_flags & XFS_DQTYPE_REC_MASK;
        ASSERT(type);
        if (log->l_quotaoffs_flag & type)
                return 0;