Whamcloud - gitweb
LU-4708 ldiskfs: do not copy NUL terminator from direntry
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / sles11sp2 / ext4-ext_generation.patch
1 ---
2  fs/ext4/ext4.h         |    1 +
3  fs/ext4/ext4_extents.h |    5 +++++
4  fs/ext4/extents.c      |    2 ++
5  3 files changed, 8 insertions(+)
6
7 --- a/fs/ext4/ext4.h
8 +++ b/fs/ext4/ext4.h
9 @@ -821,6 +821,7 @@ struct ext4_inode_info {
10         struct inode vfs_inode;
11         struct jbd2_inode *jinode;
12  
13 +       unsigned long i_ext_generation;
14         struct ext4_ext_cache i_cached_extent;
15         /*
16          * File creation time. Its function is same as that of
17 --- a/fs/ext4/ext4_extents.h
18 +++ b/fs/ext4/ext4_extents.h
19 @@ -193,6 +193,11 @@ static inline unsigned short ext_depth(s
20         return le16_to_cpu(ext_inode_hdr(inode)->eh_depth);
21  }
22  
23 +static inline void ext4_ext_tree_changed(struct inode *inode)
24 +{
25 +       EXT4_I(inode)->i_ext_generation++;
26 +}
27 +
28  static inline void
29  ext4_ext_invalidate_cache(struct inode *inode)
30  {
31 --- a/fs/ext4/extents.c
32 +++ b/fs/ext4/extents.c
33 @@ -1874,6 +1874,7 @@ cleanup:
34                 ext4_ext_drop_refs(npath);
35                 kfree(npath);
36         }
37 +       ext4_ext_tree_changed(inode);
38         ext4_ext_invalidate_cache(inode);
39         return err;
40  }
41 @@ -2681,6 +2682,7 @@ again:
42                 }
43         }
44  out:
45 +       ext4_ext_tree_changed(inode);
46         ext4_ext_drop_refs(path);
47         kfree(path);
48         if (err == -EAGAIN)