Message ID | 157259461351.28278.7899654768801700302.stgit@fedora-28 (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | xfs: mount API patch series | expand |
On Fri, Nov 01, 2019 at 03:50:13PM +0800, Ian Kent wrote: > 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> Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
On Fri, Nov 01, 2019 at 03:50:13PM +0800, Ian Kent wrote: > 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> Looks ok, Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> --D > --- > fs/xfs/xfs_super.c | 4 +--- > 1 file changed, 1 insertion(+), 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)) { >
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)) {
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> --- fs/xfs/xfs_super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)