diff mbox series

[32/43] libxfs: replace xfs_sb_version checks with feature flag checks

Message ID 163158737492.1604118.6745890320211128923.stgit@magnolia (mailing list archive)
State Accepted, archived
Headers show
Series xfs: sync libxfs with 5.15 | expand

Commit Message

Darrick J. Wong Sept. 14, 2021, 2:42 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Convert the xfs_sb_version_hasfoo() to checks against mp->m_features.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 libxfs/init.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libxfs/init.c b/libxfs/init.c
index e7009a2e..593d0fa2 100644
--- a/libxfs/init.c
+++ b/libxfs/init.c
@@ -424,17 +424,17 @@  rtmount_init(
 	xfs_daddr_t	d;	/* address of last block of subvolume */
 	int		error;
 
-	if (mp->m_sb.sb_rblocks == 0)
+	if (!xfs_has_realtime(mp))
 		return 0;
 
-	if (xfs_sb_version_hasreflink(&mp->m_sb)) {
+	if (xfs_has_reflink(mp)) {
 		fprintf(stderr,
 	_("%s: Reflink not compatible with realtime device. Please try a newer xfsprogs.\n"),
 				progname);
 		return -1;
 	}
 
-	if (xfs_sb_version_hasrmapbt(&mp->m_sb)) {
+	if (xfs_has_rmapbt(mp)) {
 		fprintf(stderr,
 	_("%s: Reverse mapping btree not compatible with realtime device. Please try a newer xfsprogs.\n"),
 				progname);