1 ext4: i_version update fix
3 From: Jean Noel Cordenner <jean-noel.cordenner@bull.net>
5 The i_version field of the inode is set on inode creation and incremented when
6 the inode is being modified.
8 Signed-off-by: Jean Noel Cordenner <jean-noel.cordenner@bull.net>
9 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
10 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
14 fs/ext4/namei.c | 4 ----
16 3 files changed, 1 insertion(+), 5 deletions(-)
19 Index: linux-2.6.23-rc5/fs/ext4/inode.c
20 ===================================================================
21 --- linux-2.6.23-rc5.orig/fs/ext4/inode.c 2007-09-12 16:49:55.000000000 -0700
22 +++ linux-2.6.23-rc5/fs/ext4/inode.c 2007-09-12 16:50:09.000000000 -0700
23 @@ -3076,6 +3076,7 @@ int ext4_mark_iloc_dirty(handle_t *handl
28 /* the do_update_inode consumes one bh->b_count */
31 Index: linux-2.6.23-rc5/fs/ext4/namei.c
32 ===================================================================
33 --- linux-2.6.23-rc5.orig/fs/ext4/namei.c 2007-09-12 16:48:23.000000000 -0700
34 +++ linux-2.6.23-rc5/fs/ext4/namei.c 2007-09-12 16:50:09.000000000 -0700
35 @@ -1318,7 +1318,6 @@ static int add_dirent_to_buf(handle_t *h
37 dir->i_mtime = dir->i_ctime = ext4_current_time(dir);
38 ext4_update_dx_flag(dir);
40 ext4_mark_inode_dirty(handle, dir);
41 BUFFER_TRACE(bh, "call ext4_journal_dirty_metadata");
42 err = ext4_journal_dirty_metadata(handle, bh);
43 @@ -1658,7 +1657,6 @@ static int ext4_delete_entry (handle_t *
44 le16_to_cpu(de->rec_len));
48 BUFFER_TRACE(bh, "call ext4_journal_dirty_metadata");
49 ext4_journal_dirty_metadata(handle, bh);
51 @@ -2131,7 +2129,6 @@ static int ext4_rmdir (struct inode * di
52 ext4_warning (inode->i_sb, "ext4_rmdir",
53 "empty directory has too many links (%d)",
57 /* There's no need to set i_disksize: the fact that i_nlink is
58 * zero will ensure that the right thing happens during any
59 @@ -2377,7 +2374,6 @@ static int ext4_rename (struct inode * o
60 if (EXT4_HAS_INCOMPAT_FEATURE(new_dir->i_sb,
61 EXT4_FEATURE_INCOMPAT_FILETYPE))
62 new_de->file_type = old_de->file_type;
63 - new_dir->i_version++;
64 BUFFER_TRACE(new_bh, "call ext4_journal_dirty_metadata");
65 ext4_journal_dirty_metadata(handle, new_bh);
67 Index: linux-2.6.23-rc5/fs/ext4/super.c
68 ===================================================================
69 --- linux-2.6.23-rc5.orig/fs/ext4/super.c 2007-09-12 16:25:40.000000000 -0700
70 +++ linux-2.6.23-rc5/fs/ext4/super.c 2007-09-12 16:50:09.000000000 -0700
71 @@ -2998,7 +2998,6 @@ out:
72 i_size_write(inode, off+len-towrite);
73 EXT4_I(inode)->i_disksize = inode->i_size;
76 inode->i_mtime = inode->i_ctime = CURRENT_TIME;
77 ext4_mark_inode_dirty(handle, inode);
78 mutex_unlock(&inode->i_mutex);