aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode_buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_inode_buf.c')
-rw-r--r--fs/xfs/xfs_inode_buf.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/xfs/xfs_inode_buf.c b/fs/xfs/xfs_inode_buf.c
index 24e993996bdc..cb35ae41d4a1 100644
--- a/fs/xfs/xfs_inode_buf.c
+++ b/fs/xfs/xfs_inode_buf.c
@@ -437,17 +437,16 @@ xfs_iread(
437 } 437 }
438 438
439 /* 439 /*
440 * The inode format changed when we moved the link count and 440 * Automatically convert version 1 inode formats in memory to version 2
441 * made it 32 bits long. If this is an old format inode, 441 * inode format. If the inode is modified, it will get logged and
442 * convert it in memory to look like a new one. If it gets 442 * rewritten as a version 2 inode. We can do this because we set the
443 * flushed to disk we will convert back before flushing or 443 * superblock feature bit for v2 inodes unconditionally during mount
444 * logging it. We zero out the new projid field and the old link 444 * and it means the reast of the code can assume the inode version is 2
445 * count field. We'll handle clearing the pad field (the remains 445 * or higher.
446 * of the old uuid field) when we actually convert the inode to
447 * the new format. We don't change the version number so that we
448 * can distinguish this from a real new format inode.
449 */ 446 */
450 if (ip->i_d.di_version == 1) { 447 if (ip->i_d.di_version == 1) {
448 ip->i_d.di_version = 2;
449 memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad));
451 ip->i_d.di_nlink = ip->i_d.di_onlink; 450 ip->i_d.di_nlink = ip->i_d.di_onlink;
452 ip->i_d.di_onlink = 0; 451 ip->i_d.di_onlink = 0;
453 xfs_set_projid(ip, 0); 452 xfs_set_projid(ip, 0);