aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode_item.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_inode_item.c')
-rw-r--r--fs/xfs/xfs_inode_item.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index 27f18c15e167..c43118148e6c 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -296,9 +296,8 @@ xfs_inode_item_format(
296 * has a new version number, then we don't bother converting back. 296 * has a new version number, then we don't bother converting back.
297 */ 297 */
298 mp = ip->i_mount; 298 mp = ip->i_mount;
299 ASSERT(ip->i_d.di_version == XFS_DINODE_VERSION_1 || 299 ASSERT(ip->i_d.di_version == 1 || xfs_sb_version_hasnlink(&mp->m_sb));
300 xfs_sb_version_hasnlink(&mp->m_sb)); 300 if (ip->i_d.di_version == 1) {
301 if (ip->i_d.di_version == XFS_DINODE_VERSION_1) {
302 if (!xfs_sb_version_hasnlink(&mp->m_sb)) { 301 if (!xfs_sb_version_hasnlink(&mp->m_sb)) {
303 /* 302 /*
304 * Convert it back. 303 * Convert it back.
@@ -311,7 +310,7 @@ xfs_inode_item_format(
311 * so just make the conversion to the new inode 310 * so just make the conversion to the new inode
312 * format permanent. 311 * format permanent.
313 */ 312 */
314 ip->i_d.di_version = XFS_DINODE_VERSION_2; 313 ip->i_d.di_version = 2;
315 ip->i_d.di_onlink = 0; 314 ip->i_d.di_onlink = 0;
316 memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad)); 315 memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad));
317 } 316 }