Whamcloud - gitweb
b=20668
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext3-xattr-no-update-ctime-2.6.22-vanilla.patch
1 Index: linux-2.6.22.14/include/linux/ext3_fs.h
2 ===================================================================
3 --- linux-2.6.22.14.orig/include/linux/ext3_fs.h
4 +++ linux-2.6.22.14/include/linux/ext3_fs.h
5 @@ -923,6 +923,13 @@ struct mmp_struct {
6  #define EXT3_MMP_MIN_CHECK_INTERVAL    5
7  
8  /*
9 + * Indicates that ctime should not be updated in ext3_xattr_set_handle()
10 + */
11 +#ifndef XATTR_NO_CTIME
12 +#define XATTR_NO_CTIME 0x80
13 +#endif
14 +
15 +/*
16   * Function prototypes
17   */
18  
19 Index: linux-2.6.22.14/fs/ext3/xattr.c
20 ===================================================================
21 --- linux-2.6.22.14.orig/fs/ext3/xattr.c
22 +++ linux-2.6.22.14/fs/ext3/xattr.c
23 @@ -1039,7 +1039,8 @@ ext3_xattr_set_handle(handle_t *handle, 
24         }
25         if (!error) {
26                 ext3_xattr_update_super_block(handle, inode->i_sb);
27 -               inode->i_ctime = ext3_current_time(inode);
28 +               if (!(flags & XATTR_NO_CTIME))
29 +                       inode->i_ctime = ext3_current_time(inode);
30                 error = ext3_mark_iloc_dirty(handle, inode, &is.iloc);
31                 if (!value)
32                         EXT3_I(inode)->i_state &= ~EXT3_STATE_NO_EXPAND;