Skip to content

Commit

Permalink
xfs: dont use XFS_IS_QUOTA_RUNNING() for option check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
raven-au authored and djwong committed Nov 5, 2019
1 parent e1d3d21 commit 3d9d60d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3d9d60d

Please sign in to comment.