Define new macro XFS_ALL_QUOTA_ACTIVE and simply some usage
authorChandra Seetharaman <sekharan@us.ibm.com>
Mon, 23 Jan 2012 17:31:43 +0000 (17:31 +0000)
committerBen Myers <bpm@sgi.com>
Fri, 3 Feb 2012 17:32:20 +0000 (11:32 -0600)
Define new macro XFS_ALL_QUOTA_ACTIVE and simply some usage
of quota macros.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_qm.c
fs/xfs/xfs_quota.h
fs/xfs/xfs_super.c

index 671f37eae1c7bbe3c9f89fd78b9c51b9195f4e32..1b2f5b37eac41b81c993075034aa40ee31a796b1 100644 (file)
@@ -1499,7 +1499,7 @@ xfs_qm_quotacheck(
         * quotachecked status, since we won't be doing accounting for
         * that type anymore.
         */
-       mp->m_qflags &= ~(XFS_OQUOTA_CHKD | XFS_UQUOTA_CHKD);
+       mp->m_qflags &= ~XFS_ALL_QUOTA_CHKD;
        mp->m_qflags |= flags;
 
  error_return:
index 8a0807e0f979eff06d930c39cdd11b3e03b2fcc4..b50ec5b95d5a89fb4b0972c1761682c27fe8cdd9 100644 (file)
@@ -174,6 +174,8 @@ typedef struct xfs_qoff_logformat {
 #define XFS_UQUOTA_ACTIVE      0x0100  /* uquotas are being turned off */
 #define XFS_PQUOTA_ACTIVE      0x0200  /* pquotas are being turned off */
 #define XFS_GQUOTA_ACTIVE      0x0400  /* gquotas are being turned off */
+#define XFS_ALL_QUOTA_ACTIVE   \
+       (XFS_UQUOTA_ACTIVE | XFS_PQUOTA_ACTIVE | XFS_GQUOTA_ACTIVE)
 
 /*
  * Checking XFS_IS_*QUOTA_ON() while holding any inode lock guarantees
index ee5b695c99a700275683d26ac78acd6351c9cc1f..5e0d43f231a4f4e48620898a5ec2e6b261a50de9 100644 (file)
@@ -324,10 +324,9 @@ xfs_parseargs(
                } else if (!strcmp(this_char, MNTOPT_FILESTREAM)) {
                        mp->m_flags |= XFS_MOUNT_FILESTREAMS;
                } else if (!strcmp(this_char, MNTOPT_NOQUOTA)) {
-                       mp->m_qflags &= ~(XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE |
-                                         XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE |
-                                         XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE |
-                                         XFS_UQUOTA_ENFD | XFS_OQUOTA_ENFD);
+                       mp->m_qflags &= ~XFS_ALL_QUOTA_ACCT;
+                       mp->m_qflags &= ~XFS_ALL_QUOTA_ENFD;
+                       mp->m_qflags &= ~XFS_ALL_QUOTA_ACTIVE;
                } else if (!strcmp(this_char, MNTOPT_QUOTA) ||
                           !strcmp(this_char, MNTOPT_UQUOTA) ||
                           !strcmp(this_char, MNTOPT_USRQUOTA)) {