Further updates of Documentation/filesystem/ext4.txt
[ext4-patch-queue.git] / ext4-remove-duplicated-xattr-macros.patch
blob062487bfc3de065e1f35b793be1eaf694bbe33ef
1 ext4: remove double definitions of xattr macros
3 From: Shen Feng <shen@cn.fujitsu.com>
5 remove the definitions of macros XATTR_TRUSTED_PREFIX and XATTR_USER_PREFIX
6 since they are defined in linux/xattr.h
8 Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
9 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
10 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
11 ---
12 fs/ext4/xattr_trusted.c | 4 +---
13 fs/ext4/xattr_user.c | 4 +---
14 2 files changed, 2 insertions(+), 6 deletions(-)
16 Index: linux-2.6.26-rc6/fs/ext4/xattr_trusted.c
17 ===================================================================
18 --- linux-2.6.26-rc6.orig/fs/ext4/xattr_trusted.c 2008-06-17 10:43:21.000000000 -0700
19 +++ linux-2.6.26-rc6/fs/ext4/xattr_trusted.c 2008-06-17 10:43:25.000000000 -0700
20 @@ -13,13 +13,11 @@
21 #include "ext4.h"
22 #include "xattr.h"
24 -#define XATTR_TRUSTED_PREFIX "trusted."
26 static size_t
27 ext4_xattr_trusted_list(struct inode *inode, char *list, size_t list_size,
28 const char *name, size_t name_len)
30 - const size_t prefix_len = sizeof(XATTR_TRUSTED_PREFIX)-1;
31 + const size_t prefix_len = XATTR_TRUSTED_PREFIX_LEN;
32 const size_t total_len = prefix_len + name_len + 1;
34 if (!capable(CAP_SYS_ADMIN))
35 Index: linux-2.6.26-rc6/fs/ext4/xattr_user.c
36 ===================================================================
37 --- linux-2.6.26-rc6.orig/fs/ext4/xattr_user.c 2008-06-17 10:43:21.000000000 -0700
38 +++ linux-2.6.26-rc6/fs/ext4/xattr_user.c 2008-06-17 10:43:25.000000000 -0700
39 @@ -12,13 +12,11 @@
40 #include "ext4.h"
41 #include "xattr.h"
43 -#define XATTR_USER_PREFIX "user."
45 static size_t
46 ext4_xattr_user_list(struct inode *inode, char *list, size_t list_size,
47 const char *name, size_t name_len)
49 - const size_t prefix_len = sizeof(XATTR_USER_PREFIX)-1;
50 + const size_t prefix_len = XATTR_USER_PREFIX_LEN;
51 const size_t total_len = prefix_len + name_len + 1;
53 if (!test_opt(inode->i_sb, XATTR_USER))