xfs: simplify the flags setting in xfs_qm_scall_quotaon
authorKaixu Xia <kaixuxia@tencent.com>
Thu, 23 Apr 2020 04:54:30 +0000 (21:54 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 4 May 2020 16:03:14 +0000 (09:03 -0700)
Simplify the setting of the flags value, and only consider
quota enforcement stuff here.

Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_qm_syscalls.c

index 5d5ac65..944486f 100644 (file)
@@ -357,11 +357,11 @@ xfs_qm_scall_quotaon(
        int             error;
        uint            qf;
 
-       flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
        /*
-        * Switching on quota accounting must be done at mount time.
+        * Switching on quota accounting must be done at mount time,
+        * only consider quota enforcement stuff here.
         */
-       flags &= ~(XFS_ALL_QUOTA_ACCT);
+       flags &= XFS_ALL_QUOTA_ENFD;
 
        if (flags == 0) {
                xfs_debug(mp, "%s: zero flags, m_qflags=%x",