aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
authorGravatar Dave Chinner <dchinner@redhat.com> 2021-08-18 18:46:56 -0700
committerGravatar Darrick J. Wong <djwong@kernel.org> 2021-08-19 10:07:14 -0700
commitd6837c1aab42e70141fd3875ba05eb69ffb220f0 (patch)
treecf5740815f8507d320bc04285f23db5090a44283 /fs/xfs/xfs_log_recover.c
parentxfs: remove unused xfs_sb_version_has wrappers (diff)
downloadlinux-d6837c1aab42e70141fd3875ba05eb69ffb220f0.tar.gz
linux-d6837c1aab42e70141fd3875ba05eb69ffb220f0.tar.bz2
linux-d6837c1aab42e70141fd3875ba05eb69ffb220f0.zip
xfs: introduce xfs_sb_is_v5 helper
Rather than open coding XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5 checks everywhere, add a simple wrapper to encapsulate this and make the code easier to read. This allows us to remove the xfs_sb_version_has_v3inode() wrapper which is only used in xfs_format.h now and is just a version number check. There are a couple of places where we should be checking the mount feature bits rather than the superblock version (e.g. remount), so those are converted to use xfs_has_crc(mp) instead. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index a985aa1a721c..10562ecbd9ea 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -3413,7 +3413,7 @@ xlog_recover(
* (e.g. unsupported transactions, then simply reject the
* attempt at recovery before touching anything.
*/
- if (XFS_SB_VERSION_NUM(&log->l_mp->m_sb) == XFS_SB_VERSION_5 &&
+ if (xfs_sb_is_v5(&log->l_mp->m_sb) &&
xfs_sb_has_incompat_log_feature(&log->l_mp->m_sb,
XFS_SB_FEAT_INCOMPAT_LOG_UNKNOWN)) {
xfs_warn(log->l_mp,