diff options
author | Ian Kent <raven@themaw.net> | 2019-11-04 13:58:41 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-05 08:28:25 -0800 |
commit | 3d9d60d9addf6c085dd37703f6307841111f8168 (patch) | |
tree | 967d7e96b5ad6acd62b1c80f6e3678305dc78557 /fs/xfs/xfs_super.c | |
parent | e1d3d218854659139731a61cf41aa391dcf949b0 (diff) |
xfs: dont use XFS_IS_QUOTA_RUNNING() for option check
When CONFIG_XFS_QUOTA is not defined any quota option is invalid.
Using the macro XFS_IS_QUOTA_RUNNING() as a check if any quota option
has been given is a little misleading so use a simple m_qflags != 0
check to make the intended use more explicit.
Also change to use the IS_ENABLED() macro for the kernel config check.
Signed-off-by: Ian Kent <raven@themaw.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 6438738a204a..fb90beeb3184 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -341,12 +341,10 @@ xfs_parseargs( return -EINVAL; } -#ifndef CONFIG_XFS_QUOTA - if (XFS_IS_QUOTA_RUNNING(mp)) { + if (!IS_ENABLED(CONFIG_XFS_QUOTA) && mp->m_qflags != 0) { xfs_warn(mp, "quota support not available in this kernel."); return -EINVAL; } -#endif if ((mp->m_dalign && !mp->m_swidth) || (!mp->m_dalign && mp->m_swidth)) { |