Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext3-xattr-no-update-ctime-suse.patch
1 Index: linux-2.6.5-7.311/include/linux/ext3_fs.h
2 ===================================================================
3 --- linux-2.6.5-7.311.orig/include/linux/ext3_fs.h
4 +++ linux-2.6.5-7.311/include/linux/ext3_fs.h
5 @@ -752,6 +752,13 @@ struct dir_private_info {
6  #define ERR_BAD_DX_DIR -75000
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.5-7.311/fs/ext3/xattr.c
20 ===================================================================
21 --- linux-2.6.5-7.311.orig/fs/ext3/xattr.c
22 +++ linux-2.6.5-7.311/fs/ext3/xattr.c
23 @@ -89,7 +89,7 @@
24  
25  static int ext3_xattr_set_handle2(handle_t *, struct inode *,
26                                   struct buffer_head *,
27 -                                 struct ext3_xattr_header *);
28 +                                 struct ext3_xattr_header *, int);
29  
30  static int ext3_xattr_cache_insert(struct buffer_head *);
31  static struct buffer_head *ext3_xattr_cache_find(struct inode *,
32 @@ -1302,7 +1302,7 @@ skip_replace:
33         }
34         error = ext3_xattr_set_handle2(handle, inode, bh,
35                                        IS_LAST_ENTRY(ENTRY(header+1)) ?
36 -                                      NULL : header);
37 +                                      NULL : header, flags);
38  
39  cleanup:
40         brelse(bh);
41 @@ -1318,7 +1318,7 @@ cleanup:
42  static int
43  ext3_xattr_set_handle2(handle_t *handle, struct inode *inode,
44                        struct buffer_head *old_bh,
45 -                      struct ext3_xattr_header *header)
46 +                      struct ext3_xattr_header *header, int flags)
47  {
48         struct super_block *sb = inode->i_sb;
49         struct buffer_head *new_bh = NULL;
50 @@ -1401,7 +1401,8 @@ getblk_failed:
51  
52         /* Update the inode. */
53         EXT3_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
54 -       inode->i_ctime = CURRENT_TIME;
55 +       if (!(flags & XATTR_NO_CTIME))
56 +               inode->i_ctime = CURRENT_TIME;
57         ext3_mark_inode_dirty(handle, inode);
58         if (IS_SYNC(inode))
59                 handle->h_sync = 1;