Skip to content

Commit dd0d2f9

Browse files
Dave Chinnerdchinner
authored andcommitted
xfs: set XFS_FEAT_NLINK correctly
While xfs_has_nlink() is not used in kernel, it is used in userspace (e.g. by xfs_db) so we need to set the XFS_FEAT_NLINK flag correctly in xfs_sb_version_to_features(). Signed-off-by: Dave Chinner <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
1 parent 1eb70f5 commit dd0d2f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/xfs/libxfs/xfs_sb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ xfs_sb_version_to_features(
7070
/* optional V4 features */
7171
if (sbp->sb_rblocks > 0)
7272
features |= XFS_FEAT_REALTIME;
73+
if (sbp->sb_versionnum & XFS_SB_VERSION_NLINKBIT)
74+
features |= XFS_FEAT_NLINK;
7375
if (sbp->sb_versionnum & XFS_SB_VERSION_ATTRBIT)
7476
features |= XFS_FEAT_ATTR;
7577
if (sbp->sb_versionnum & XFS_SB_VERSION_QUOTABIT)

0 commit comments

Comments
 (0)