Index: linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h =================================================================== --- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_extents.h +++ linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h @@ -203,6 +203,11 @@ static inline unsigned short ext_depth(s return le16_to_cpu(ext_inode_hdr(inode)->eh_depth); } +static inline void ext4_ext_tree_changed(struct inode *inode) +{ + EXT4_I(inode)->i_ext_generation++; +} + static inline void ext4_ext_invalidate_cache(struct inode *inode) { Index: linux-2.6.27.21-0.1/fs/ext4/ext4_i.h =================================================================== --- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_i.h +++ linux-2.6.27.21-0.1/fs/ext4/ext4_i.h @@ -114,6 +114,7 @@ struct ext4_inode_info { struct inode vfs_inode; struct jbd2_inode jinode; + unsigned long i_ext_generation; struct ext4_ext_cache i_cached_extent; /* * File creation time. Its function is same as that of Index: linux-2.6.27.21-0.1/fs/ext4/extents.c =================================================================== --- linux-2.6.27.21-0.1.orig/fs/ext4/extents.c +++ linux-2.6.27.21-0.1/fs/ext4/extents.c @@ -1618,6 +1618,7 @@ cleanup: ext4_ext_drop_refs(npath); kfree(npath); } + ext4_ext_tree_changed(inode); ext4_ext_invalidate_cache(inode); return err; } @@ -2278,6 +2279,7 @@ static int ext4_ext_remove_space(struct } } out: + ext4_ext_tree_changed(inode); ext4_ext_drop_refs(path); kfree(path); ext4_journal_stop(handle);