1 Index: linux-3.12.39-47.1/fs/ext4/inode.c
2 ===================================================================
3 --- linux-3.12.39-47.1.orig/fs/ext4/inode.c
4 +++ linux-3.12.39-47.1/fs/ext4/inode.c
5 @@ -4166,11 +4166,11 @@ struct inode *ext4_iget(struct super_blo
6 EXT4_INODE_GET_XTIME(i_atime, inode, raw_inode);
7 EXT4_EINODE_GET_XTIME(i_crtime, ei, raw_inode);
9 - inode->i_version = le32_to_cpu(raw_inode->i_disk_version);
10 + ei->i_fs_version = le32_to_cpu(raw_inode->i_disk_version);
11 if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) {
12 if (EXT4_FITS_IN_INODE(raw_inode, ei, i_version_hi))
14 - (__u64)(le32_to_cpu(raw_inode->i_version_hi)) << 32;
15 + ei->i_fs_version |= (__u64)(le32_to_cpu(raw_inode->i_version_hi))
20 @@ -4393,11 +4393,11 @@ static int ext4_do_update_inode(handle_t
21 raw_inode->i_block[block] = ei->i_data[block];
24 - raw_inode->i_disk_version = cpu_to_le32(inode->i_version);
25 + raw_inode->i_disk_version = cpu_to_le32(ei->i_fs_version);
26 if (ei->i_extra_isize) {
27 if (EXT4_FITS_IN_INODE(raw_inode, ei, i_version_hi))
28 - raw_inode->i_version_hi =
29 - cpu_to_le32(inode->i_version >> 32);
30 + raw_inode->i_version_hi = cpu_to_le32(ei->i_fs_version
32 raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
35 Index: linux-3.12.39-47.1/fs/ext4/ialloc.c
36 ===================================================================
37 --- linux-3.12.39-47.1.orig/fs/ext4/ialloc.c
38 +++ linux-3.12.39-47.1/fs/ext4/ialloc.c
39 @@ -973,6 +973,7 @@ got:
41 ei->i_block_group = group;
42 ei->i_last_alloc_group = ~0;
43 + ei->i_fs_version = 0;
45 ext4_set_inode_flags(inode);
46 if (IS_DIRSYNC(inode))
47 Index: linux-3.12.39-47.1/fs/ext4/ext4.h
48 ===================================================================
49 --- linux-3.12.39-47.1.orig/fs/ext4/ext4.h
50 +++ linux-3.12.39-47.1/fs/ext4/ext4.h
51 @@ -929,6 +929,8 @@ struct ext4_inode_info {
57 /* Precomputed uuid+inum+igen checksum for seeding inode checksums */