Merge tag 'backlight-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / fs / xfs / xfs_rtalloc.c
index 699066fb9052d315f5670c93ff39bb3c7b7a234f..b8c79ee791afc7415f9b61214d9a447a16bd63f2 100644 (file)
@@ -951,8 +951,7 @@ xfs_growfs_rt(
                return -EINVAL;
 
        /* Unsupported realtime features. */
-       if (xfs_sb_version_hasrmapbt(&mp->m_sb) ||
-           xfs_sb_version_hasreflink(&mp->m_sb))
+       if (xfs_has_rmapbt(mp) || xfs_has_reflink(mp))
                return -EOPNOTSUPP;
 
        nrblocks = in->newblocks;
@@ -1131,6 +1130,9 @@ error_cancel:
                error = xfs_trans_commit(tp);
                if (error)
                        break;
+
+               /* Ensure the mount RT feature flag is now set. */
+               mp->m_features |= XFS_FEAT_REALTIME;
        }
        if (error)
                goto out_free;