aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_bmap.c')
-rw-r--r--fs/xfs/xfs_bmap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 82496d901d23..fbd48f9b797e 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -3909,19 +3909,20 @@ xfs_bmap_add_attrfork(
3909 goto error2; 3909 goto error2;
3910 if (!XFS_SB_VERSION_HASATTR(&mp->m_sb) || 3910 if (!XFS_SB_VERSION_HASATTR(&mp->m_sb) ||
3911 (!XFS_SB_VERSION_HASATTR2(&mp->m_sb) && version == 2)) { 3911 (!XFS_SB_VERSION_HASATTR2(&mp->m_sb) && version == 2)) {
3912 logflags = 0; 3912 __int64_t sbfields = 0;
3913
3913 s = XFS_SB_LOCK(mp); 3914 s = XFS_SB_LOCK(mp);
3914 if (!XFS_SB_VERSION_HASATTR(&mp->m_sb)) { 3915 if (!XFS_SB_VERSION_HASATTR(&mp->m_sb)) {
3915 XFS_SB_VERSION_ADDATTR(&mp->m_sb); 3916 XFS_SB_VERSION_ADDATTR(&mp->m_sb);
3916 logflags |= XFS_SB_VERSIONNUM; 3917 sbfields |= XFS_SB_VERSIONNUM;
3917 } 3918 }
3918 if (!XFS_SB_VERSION_HASATTR2(&mp->m_sb) && version == 2) { 3919 if (!XFS_SB_VERSION_HASATTR2(&mp->m_sb) && version == 2) {
3919 XFS_SB_VERSION_ADDATTR2(&mp->m_sb); 3920 XFS_SB_VERSION_ADDATTR2(&mp->m_sb);
3920 logflags |= (XFS_SB_VERSIONNUM | XFS_SB_FEATURES2); 3921 sbfields |= (XFS_SB_VERSIONNUM | XFS_SB_FEATURES2);
3921 } 3922 }
3922 if (logflags) { 3923 if (sbfields) {
3923 XFS_SB_UNLOCK(mp, s); 3924 XFS_SB_UNLOCK(mp, s);
3924 xfs_mod_sb(tp, logflags); 3925 xfs_mod_sb(tp, sbfields);
3925 } else 3926 } else
3926 XFS_SB_UNLOCK(mp, s); 3927 XFS_SB_UNLOCK(mp, s);
3927 } 3928 }