From: Dave Chinner Date: Mon, 19 May 2014 21:41:43 +0000 (+1000) Subject: xfs: keep sb_bad_features2 the same a sb_features2 X-Git-Tag: next-20140521~88^2^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=32bf1deae15b67839a2f0cb233254125be73fc78;p=karo-tx-linux.git xfs: keep sb_bad_features2 the same a sb_features2 Whenever we update sb_features2, we need to update sb_bad_features2 so that they remain identical on disk. This prevents future mounts or userspace utilities from getting confused over which features the filesystem supports. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner --- diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index 57f6ba13d19f..a6a76f41aad2 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h @@ -468,11 +468,13 @@ static inline void xfs_sb_version_addattr2(struct xfs_sb *sbp) { sbp->sb_versionnum |= XFS_SB_VERSION_MOREBITSBIT; sbp->sb_features2 |= XFS_SB_VERSION2_ATTR2BIT; + sbp->sb_bad_features2 |= XFS_SB_VERSION2_ATTR2BIT; } static inline void xfs_sb_version_removeattr2(struct xfs_sb *sbp) { sbp->sb_features2 &= ~XFS_SB_VERSION2_ATTR2BIT; + sbp->sb_bad_features2 &= ~XFS_SB_VERSION2_ATTR2BIT; if (!sbp->sb_features2) sbp->sb_versionnum &= ~XFS_SB_VERSION_MOREBITSBIT; }