]> git.ipfire.org Git - people/ms/linux.git/commit - fs/xfs/xfs_super.c
xfs: introduce xfs_sb_is_v5 helper
authorDave Chinner <dchinner@redhat.com>
Thu, 19 Aug 2021 01:46:56 +0000 (18:46 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 19 Aug 2021 17:07:14 +0000 (10:07 -0700)
commitd6837c1aab42e70141fd3875ba05eb69ffb220f0
treecf5740815f8507d320bc04285f23db5090a44283
parent2beb7b50ddd429f47b6cabd186b3102d2a6aa505
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>
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_sb.c
fs/xfs/scrub/agheader.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_super.c