Message ID | 157190346159.27074.3152127833811363522.stgit@fedora-28 (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | xfs: mount API patch series | expand |
On Thu, Oct 24, 2019 at 03:51:01PM +0800, Ian Kent wrote: > -#ifndef CONFIG_XFS_QUOTA > - if (XFS_IS_QUOTA_RUNNING(mp)) { > +#if !IS_ENABLED(CONFIG_XFS_QUOTA) > + if (mp->m_qflags != 0) { The whole point of IS_ENABLED is that you can directly use it in C code instead of only through the preprocessor. So this should be: if (!IS_ENABLED(CONFIG_XFS_QUOTA) && mp->m_qflags != 0) {
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 5876c2b551b5..a0805b74256c 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -348,8 +348,8 @@ xfs_parseargs( return -EINVAL; } -#ifndef CONFIG_XFS_QUOTA - if (XFS_IS_QUOTA_RUNNING(mp)) { +#if !IS_ENABLED(CONFIG_XFS_QUOTA) + if (mp->m_qflags != 0) { xfs_warn(mp, "quota support not available in this kernel."); return -EINVAL; }