diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2015-12-02 08:44:35 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-06 21:25:17 -0500 |
commit | 97d79299223baab330b194437e676d301f12d5f6 (patch) | |
tree | 7845b5fe37465c52d3a8584b4f00945617333a0d | |
parent | 44cb0d3f778da6646f8e993245ee827a6b7df6d5 (diff) |
posix acls: Remove duplicate xattr name definitions
Remove POSIX_ACL_XATTR_{ACCESS,DEFAULT} and GFS2_POSIX_ACL_{ACCESS,DEFAULT}
and replace them with the definitions in <include/uapi/linux/xattr.h>.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/staging/lustre/lustre/llite/xattr.c | 4 | ||||
-rw-r--r-- | fs/9p/acl.c | 12 | ||||
-rw-r--r-- | fs/btrfs/acl.c | 8 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 8 | ||||
-rw-r--r-- | fs/ceph/acl.c | 16 | ||||
-rw-r--r-- | fs/cifs/xattr.c | 16 | ||||
-rw-r--r-- | fs/gfs2/acl.c | 4 | ||||
-rw-r--r-- | fs/gfs2/acl.h | 2 | ||||
-rw-r--r-- | fs/hfsplus/posix_acl.c | 8 | ||||
-rw-r--r-- | fs/jfs/acl.c | 8 | ||||
-rw-r--r-- | fs/nfs/nfs3acl.c | 4 | ||||
-rw-r--r-- | fs/posix_acl.c | 4 | ||||
-rw-r--r-- | fs/reiserfs/xattr_acl.c | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_xattr.c | 8 | ||||
-rw-r--r-- | include/linux/posix_acl_xattr.h | 6 |
15 files changed, 55 insertions, 61 deletions
diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 4b7eb33f7d01..660b8ac37ae0 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c | |||
@@ -60,10 +60,10 @@ | |||
60 | static | 60 | static |
61 | int get_xattr_type(const char *name) | 61 | int get_xattr_type(const char *name) |
62 | { | 62 | { |
63 | if (!strcmp(name, POSIX_ACL_XATTR_ACCESS)) | 63 | if (!strcmp(name, XATTR_NAME_POSIX_ACL_ACCESS)) |
64 | return XATTR_ACL_ACCESS_T; | 64 | return XATTR_ACL_ACCESS_T; |
65 | 65 | ||
66 | if (!strcmp(name, POSIX_ACL_XATTR_DEFAULT)) | 66 | if (!strcmp(name, XATTR_NAME_POSIX_ACL_DEFAULT)) |
67 | return XATTR_ACL_DEFAULT_T; | 67 | return XATTR_ACL_DEFAULT_T; |
68 | 68 | ||
69 | if (!strncmp(name, XATTR_USER_PREFIX, | 69 | if (!strncmp(name, XATTR_USER_PREFIX, |
diff --git a/fs/9p/acl.c b/fs/9p/acl.c index a7e28890f5ef..6ff30b14bc76 100644 --- a/fs/9p/acl.c +++ b/fs/9p/acl.c | |||
@@ -67,8 +67,8 @@ int v9fs_get_acl(struct inode *inode, struct p9_fid *fid) | |||
67 | return 0; | 67 | return 0; |
68 | } | 68 | } |
69 | /* get the default/access acl values and cache them */ | 69 | /* get the default/access acl values and cache them */ |
70 | dacl = __v9fs_get_acl(fid, POSIX_ACL_XATTR_DEFAULT); | 70 | dacl = __v9fs_get_acl(fid, XATTR_NAME_POSIX_ACL_DEFAULT); |
71 | pacl = __v9fs_get_acl(fid, POSIX_ACL_XATTR_ACCESS); | 71 | pacl = __v9fs_get_acl(fid, XATTR_NAME_POSIX_ACL_ACCESS); |
72 | 72 | ||
73 | if (!IS_ERR(dacl) && !IS_ERR(pacl)) { | 73 | if (!IS_ERR(dacl) && !IS_ERR(pacl)) { |
74 | set_cached_acl(inode, ACL_TYPE_DEFAULT, dacl); | 74 | set_cached_acl(inode, ACL_TYPE_DEFAULT, dacl); |
@@ -133,10 +133,10 @@ static int v9fs_set_acl(struct p9_fid *fid, int type, struct posix_acl *acl) | |||
133 | goto err_free_out; | 133 | goto err_free_out; |
134 | switch (type) { | 134 | switch (type) { |
135 | case ACL_TYPE_ACCESS: | 135 | case ACL_TYPE_ACCESS: |
136 | name = POSIX_ACL_XATTR_ACCESS; | 136 | name = XATTR_NAME_POSIX_ACL_ACCESS; |
137 | break; | 137 | break; |
138 | case ACL_TYPE_DEFAULT: | 138 | case ACL_TYPE_DEFAULT: |
139 | name = POSIX_ACL_XATTR_DEFAULT; | 139 | name = XATTR_NAME_POSIX_ACL_DEFAULT; |
140 | break; | 140 | break; |
141 | default: | 141 | default: |
142 | BUG(); | 142 | BUG(); |
@@ -328,14 +328,14 @@ err_out: | |||
328 | } | 328 | } |
329 | 329 | ||
330 | const struct xattr_handler v9fs_xattr_acl_access_handler = { | 330 | const struct xattr_handler v9fs_xattr_acl_access_handler = { |
331 | .prefix = POSIX_ACL_XATTR_ACCESS, | 331 | .prefix = XATTR_NAME_POSIX_ACL_ACCESS, |
332 | .flags = ACL_TYPE_ACCESS, | 332 | .flags = ACL_TYPE_ACCESS, |
333 | .get = v9fs_xattr_get_acl, | 333 | .get = v9fs_xattr_get_acl, |
334 | .set = v9fs_xattr_set_acl, | 334 | .set = v9fs_xattr_set_acl, |
335 | }; | 335 | }; |
336 | 336 | ||
337 | const struct xattr_handler v9fs_xattr_acl_default_handler = { | 337 | const struct xattr_handler v9fs_xattr_acl_default_handler = { |
338 | .prefix = POSIX_ACL_XATTR_DEFAULT, | 338 | .prefix = XATTR_NAME_POSIX_ACL_DEFAULT, |
339 | .flags = ACL_TYPE_DEFAULT, | 339 | .flags = ACL_TYPE_DEFAULT, |
340 | .get = v9fs_xattr_get_acl, | 340 | .get = v9fs_xattr_get_acl, |
341 | .set = v9fs_xattr_set_acl, | 341 | .set = v9fs_xattr_set_acl, |
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 9a0124a95851..f89db0c21b51 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c | |||
@@ -37,10 +37,10 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) | |||
37 | 37 | ||
38 | switch (type) { | 38 | switch (type) { |
39 | case ACL_TYPE_ACCESS: | 39 | case ACL_TYPE_ACCESS: |
40 | name = POSIX_ACL_XATTR_ACCESS; | 40 | name = XATTR_NAME_POSIX_ACL_ACCESS; |
41 | break; | 41 | break; |
42 | case ACL_TYPE_DEFAULT: | 42 | case ACL_TYPE_DEFAULT: |
43 | name = POSIX_ACL_XATTR_DEFAULT; | 43 | name = XATTR_NAME_POSIX_ACL_DEFAULT; |
44 | break; | 44 | break; |
45 | default: | 45 | default: |
46 | BUG(); | 46 | BUG(); |
@@ -81,7 +81,7 @@ static int __btrfs_set_acl(struct btrfs_trans_handle *trans, | |||
81 | 81 | ||
82 | switch (type) { | 82 | switch (type) { |
83 | case ACL_TYPE_ACCESS: | 83 | case ACL_TYPE_ACCESS: |
84 | name = POSIX_ACL_XATTR_ACCESS; | 84 | name = XATTR_NAME_POSIX_ACL_ACCESS; |
85 | if (acl) { | 85 | if (acl) { |
86 | ret = posix_acl_equiv_mode(acl, &inode->i_mode); | 86 | ret = posix_acl_equiv_mode(acl, &inode->i_mode); |
87 | if (ret < 0) | 87 | if (ret < 0) |
@@ -94,7 +94,7 @@ static int __btrfs_set_acl(struct btrfs_trans_handle *trans, | |||
94 | case ACL_TYPE_DEFAULT: | 94 | case ACL_TYPE_DEFAULT: |
95 | if (!S_ISDIR(inode->i_mode)) | 95 | if (!S_ISDIR(inode->i_mode)) |
96 | return acl ? -EINVAL : 0; | 96 | return acl ? -EINVAL : 0; |
97 | name = POSIX_ACL_XATTR_DEFAULT; | 97 | name = XATTR_NAME_POSIX_ACL_DEFAULT; |
98 | break; | 98 | break; |
99 | default: | 99 | default: |
100 | return -EINVAL; | 100 | return -EINVAL; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a70c5790f8f5..d540fd70f6c6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -3550,10 +3550,10 @@ static noinline int acls_after_inode_item(struct extent_buffer *leaf, | |||
3550 | int scanned = 0; | 3550 | int scanned = 0; |
3551 | 3551 | ||
3552 | if (!xattr_access) { | 3552 | if (!xattr_access) { |
3553 | xattr_access = btrfs_name_hash(POSIX_ACL_XATTR_ACCESS, | 3553 | xattr_access = btrfs_name_hash(XATTR_NAME_POSIX_ACL_ACCESS, |
3554 | strlen(POSIX_ACL_XATTR_ACCESS)); | 3554 | strlen(XATTR_NAME_POSIX_ACL_ACCESS)); |
3555 | xattr_default = btrfs_name_hash(POSIX_ACL_XATTR_DEFAULT, | 3555 | xattr_default = btrfs_name_hash(XATTR_NAME_POSIX_ACL_DEFAULT, |
3556 | strlen(POSIX_ACL_XATTR_DEFAULT)); | 3556 | strlen(XATTR_NAME_POSIX_ACL_DEFAULT)); |
3557 | } | 3557 | } |
3558 | 3558 | ||
3559 | slot++; | 3559 | slot++; |
diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c index 8f84646f10e9..f19708487e2f 100644 --- a/fs/ceph/acl.c +++ b/fs/ceph/acl.c | |||
@@ -49,10 +49,10 @@ struct posix_acl *ceph_get_acl(struct inode *inode, int type) | |||
49 | 49 | ||
50 | switch (type) { | 50 | switch (type) { |
51 | case ACL_TYPE_ACCESS: | 51 | case ACL_TYPE_ACCESS: |
52 | name = POSIX_ACL_XATTR_ACCESS; | 52 | name = XATTR_NAME_POSIX_ACL_ACCESS; |
53 | break; | 53 | break; |
54 | case ACL_TYPE_DEFAULT: | 54 | case ACL_TYPE_DEFAULT: |
55 | name = POSIX_ACL_XATTR_DEFAULT; | 55 | name = XATTR_NAME_POSIX_ACL_DEFAULT; |
56 | break; | 56 | break; |
57 | default: | 57 | default: |
58 | BUG(); | 58 | BUG(); |
@@ -92,7 +92,7 @@ int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
92 | 92 | ||
93 | switch (type) { | 93 | switch (type) { |
94 | case ACL_TYPE_ACCESS: | 94 | case ACL_TYPE_ACCESS: |
95 | name = POSIX_ACL_XATTR_ACCESS; | 95 | name = XATTR_NAME_POSIX_ACL_ACCESS; |
96 | if (acl) { | 96 | if (acl) { |
97 | ret = posix_acl_equiv_mode(acl, &new_mode); | 97 | ret = posix_acl_equiv_mode(acl, &new_mode); |
98 | if (ret < 0) | 98 | if (ret < 0) |
@@ -106,7 +106,7 @@ int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type) | |||
106 | ret = acl ? -EINVAL : 0; | 106 | ret = acl ? -EINVAL : 0; |
107 | goto out; | 107 | goto out; |
108 | } | 108 | } |
109 | name = POSIX_ACL_XATTR_DEFAULT; | 109 | name = XATTR_NAME_POSIX_ACL_DEFAULT; |
110 | break; | 110 | break; |
111 | default: | 111 | default: |
112 | ret = -EINVAL; | 112 | ret = -EINVAL; |
@@ -202,11 +202,11 @@ int ceph_pre_init_acls(struct inode *dir, umode_t *mode, | |||
202 | ceph_pagelist_encode_32(pagelist, acl && default_acl ? 2 : 1); | 202 | ceph_pagelist_encode_32(pagelist, acl && default_acl ? 2 : 1); |
203 | 203 | ||
204 | if (acl) { | 204 | if (acl) { |
205 | size_t len = strlen(POSIX_ACL_XATTR_ACCESS); | 205 | size_t len = strlen(XATTR_NAME_POSIX_ACL_ACCESS); |
206 | err = ceph_pagelist_reserve(pagelist, len + val_size1 + 8); | 206 | err = ceph_pagelist_reserve(pagelist, len + val_size1 + 8); |
207 | if (err) | 207 | if (err) |
208 | goto out_err; | 208 | goto out_err; |
209 | ceph_pagelist_encode_string(pagelist, POSIX_ACL_XATTR_ACCESS, | 209 | ceph_pagelist_encode_string(pagelist, XATTR_NAME_POSIX_ACL_ACCESS, |
210 | len); | 210 | len); |
211 | err = posix_acl_to_xattr(&init_user_ns, acl, | 211 | err = posix_acl_to_xattr(&init_user_ns, acl, |
212 | tmp_buf, val_size1); | 212 | tmp_buf, val_size1); |
@@ -216,12 +216,12 @@ int ceph_pre_init_acls(struct inode *dir, umode_t *mode, | |||
216 | ceph_pagelist_append(pagelist, tmp_buf, val_size1); | 216 | ceph_pagelist_append(pagelist, tmp_buf, val_size1); |
217 | } | 217 | } |
218 | if (default_acl) { | 218 | if (default_acl) { |
219 | size_t len = strlen(POSIX_ACL_XATTR_DEFAULT); | 219 | size_t len = strlen(XATTR_NAME_POSIX_ACL_DEFAULT); |
220 | err = ceph_pagelist_reserve(pagelist, len + val_size2 + 8); | 220 | err = ceph_pagelist_reserve(pagelist, len + val_size2 + 8); |
221 | if (err) | 221 | if (err) |
222 | goto out_err; | 222 | goto out_err; |
223 | err = ceph_pagelist_encode_string(pagelist, | 223 | err = ceph_pagelist_encode_string(pagelist, |
224 | POSIX_ACL_XATTR_DEFAULT, len); | 224 | XATTR_NAME_POSIX_ACL_DEFAULT, len); |
225 | err = posix_acl_to_xattr(&init_user_ns, default_acl, | 225 | err = posix_acl_to_xattr(&init_user_ns, default_acl, |
226 | tmp_buf, val_size2); | 226 | tmp_buf, val_size2); |
227 | if (err < 0) | 227 | if (err < 0) |
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index ff9e1f8b16a4..f5dc2f0df4ad 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -190,8 +190,8 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, | |||
190 | #endif /* CONFIG_CIFS_ACL */ | 190 | #endif /* CONFIG_CIFS_ACL */ |
191 | } else { | 191 | } else { |
192 | int temp; | 192 | int temp; |
193 | temp = strncmp(ea_name, POSIX_ACL_XATTR_ACCESS, | 193 | temp = strncmp(ea_name, XATTR_NAME_POSIX_ACL_ACCESS, |
194 | strlen(POSIX_ACL_XATTR_ACCESS)); | 194 | strlen(XATTR_NAME_POSIX_ACL_ACCESS)); |
195 | if (temp == 0) { | 195 | if (temp == 0) { |
196 | #ifdef CONFIG_CIFS_POSIX | 196 | #ifdef CONFIG_CIFS_POSIX |
197 | if (sb->s_flags & MS_POSIXACL) | 197 | if (sb->s_flags & MS_POSIXACL) |
@@ -203,8 +203,8 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, | |||
203 | #else | 203 | #else |
204 | cifs_dbg(FYI, "set POSIX ACL not supported\n"); | 204 | cifs_dbg(FYI, "set POSIX ACL not supported\n"); |
205 | #endif | 205 | #endif |
206 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, | 206 | } else if (strncmp(ea_name, XATTR_NAME_POSIX_ACL_DEFAULT, |
207 | strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { | 207 | strlen(XATTR_NAME_POSIX_ACL_DEFAULT)) == 0) { |
208 | #ifdef CONFIG_CIFS_POSIX | 208 | #ifdef CONFIG_CIFS_POSIX |
209 | if (sb->s_flags & MS_POSIXACL) | 209 | if (sb->s_flags & MS_POSIXACL) |
210 | rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, | 210 | rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, |
@@ -292,8 +292,8 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, | |||
292 | rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon, | 292 | rc = pTcon->ses->server->ops->query_all_EAs(xid, pTcon, |
293 | full_path, ea_name, ea_value, buf_size, | 293 | full_path, ea_name, ea_value, buf_size, |
294 | cifs_sb->local_nls, cifs_remap(cifs_sb)); | 294 | cifs_sb->local_nls, cifs_remap(cifs_sb)); |
295 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_ACCESS, | 295 | } else if (strncmp(ea_name, XATTR_NAME_POSIX_ACL_ACCESS, |
296 | strlen(POSIX_ACL_XATTR_ACCESS)) == 0) { | 296 | strlen(XATTR_NAME_POSIX_ACL_ACCESS)) == 0) { |
297 | #ifdef CONFIG_CIFS_POSIX | 297 | #ifdef CONFIG_CIFS_POSIX |
298 | if (sb->s_flags & MS_POSIXACL) | 298 | if (sb->s_flags & MS_POSIXACL) |
299 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, | 299 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, |
@@ -303,8 +303,8 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, | |||
303 | #else | 303 | #else |
304 | cifs_dbg(FYI, "Query POSIX ACL not supported yet\n"); | 304 | cifs_dbg(FYI, "Query POSIX ACL not supported yet\n"); |
305 | #endif /* CONFIG_CIFS_POSIX */ | 305 | #endif /* CONFIG_CIFS_POSIX */ |
306 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, | 306 | } else if (strncmp(ea_name, XATTR_NAME_POSIX_ACL_DEFAULT, |
307 | strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { | 307 | strlen(XATTR_NAME_POSIX_ACL_DEFAULT)) == 0) { |
308 | #ifdef CONFIG_CIFS_POSIX | 308 | #ifdef CONFIG_CIFS_POSIX |
309 | if (sb->s_flags & MS_POSIXACL) | 309 | if (sb->s_flags & MS_POSIXACL) |
310 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, | 310 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, |
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 1be3b061c05c..791932617d1a 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c | |||
@@ -31,9 +31,9 @@ static const char *gfs2_acl_name(int type) | |||
31 | { | 31 | { |
32 | switch (type) { | 32 | switch (type) { |
33 | case ACL_TYPE_ACCESS: | 33 | case ACL_TYPE_ACCESS: |
34 | return GFS2_POSIX_ACL_ACCESS; | 34 | return XATTR_POSIX_ACL_ACCESS; |
35 | case ACL_TYPE_DEFAULT: | 35 | case ACL_TYPE_DEFAULT: |
36 | return GFS2_POSIX_ACL_DEFAULT; | 36 | return XATTR_POSIX_ACL_DEFAULT; |
37 | } | 37 | } |
38 | return NULL; | 38 | return NULL; |
39 | } | 39 | } |
diff --git a/fs/gfs2/acl.h b/fs/gfs2/acl.h index 2d65ec4cd4be..3af4f407a483 100644 --- a/fs/gfs2/acl.h +++ b/fs/gfs2/acl.h | |||
@@ -12,8 +12,6 @@ | |||
12 | 12 | ||
13 | #include "incore.h" | 13 | #include "incore.h" |
14 | 14 | ||
15 | #define GFS2_POSIX_ACL_ACCESS "posix_acl_access" | ||
16 | #define GFS2_POSIX_ACL_DEFAULT "posix_acl_default" | ||
17 | #define GFS2_ACL_MAX_ENTRIES(sdp) ((300 << (sdp)->sd_sb.sb_bsize_shift) >> 12) | 15 | #define GFS2_ACL_MAX_ENTRIES(sdp) ((300 << (sdp)->sd_sb.sb_bsize_shift) >> 12) |
18 | 16 | ||
19 | extern struct posix_acl *gfs2_get_acl(struct inode *inode, int type); | 17 | extern struct posix_acl *gfs2_get_acl(struct inode *inode, int type); |
diff --git a/fs/hfsplus/posix_acl.c b/fs/hfsplus/posix_acl.c index df0c9af68d05..afb33eda6d7d 100644 --- a/fs/hfsplus/posix_acl.c +++ b/fs/hfsplus/posix_acl.c | |||
@@ -21,10 +21,10 @@ struct posix_acl *hfsplus_get_posix_acl(struct inode *inode, int type) | |||
21 | 21 | ||
22 | switch (type) { | 22 | switch (type) { |
23 | case ACL_TYPE_ACCESS: | 23 | case ACL_TYPE_ACCESS: |
24 | xattr_name = POSIX_ACL_XATTR_ACCESS; | 24 | xattr_name = XATTR_NAME_POSIX_ACL_ACCESS; |
25 | break; | 25 | break; |
26 | case ACL_TYPE_DEFAULT: | 26 | case ACL_TYPE_DEFAULT: |
27 | xattr_name = POSIX_ACL_XATTR_DEFAULT; | 27 | xattr_name = XATTR_NAME_POSIX_ACL_DEFAULT; |
28 | break; | 28 | break; |
29 | default: | 29 | default: |
30 | return ERR_PTR(-EINVAL); | 30 | return ERR_PTR(-EINVAL); |
@@ -66,7 +66,7 @@ int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, | |||
66 | 66 | ||
67 | switch (type) { | 67 | switch (type) { |
68 | case ACL_TYPE_ACCESS: | 68 | case ACL_TYPE_ACCESS: |
69 | xattr_name = POSIX_ACL_XATTR_ACCESS; | 69 | xattr_name = XATTR_NAME_POSIX_ACL_ACCESS; |
70 | if (acl) { | 70 | if (acl) { |
71 | err = posix_acl_equiv_mode(acl, &inode->i_mode); | 71 | err = posix_acl_equiv_mode(acl, &inode->i_mode); |
72 | if (err < 0) | 72 | if (err < 0) |
@@ -76,7 +76,7 @@ int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, | |||
76 | break; | 76 | break; |
77 | 77 | ||
78 | case ACL_TYPE_DEFAULT: | 78 | case ACL_TYPE_DEFAULT: |
79 | xattr_name = POSIX_ACL_XATTR_DEFAULT; | 79 | xattr_name = XATTR_NAME_POSIX_ACL_DEFAULT; |
80 | if (!S_ISDIR(inode->i_mode)) | 80 | if (!S_ISDIR(inode->i_mode)) |
81 | return acl ? -EACCES : 0; | 81 | return acl ? -EACCES : 0; |
82 | break; | 82 | break; |
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index 0c8ca830b113..49456853e9de 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c | |||
@@ -40,10 +40,10 @@ struct posix_acl *jfs_get_acl(struct inode *inode, int type) | |||
40 | 40 | ||
41 | switch(type) { | 41 | switch(type) { |
42 | case ACL_TYPE_ACCESS: | 42 | case ACL_TYPE_ACCESS: |
43 | ea_name = POSIX_ACL_XATTR_ACCESS; | 43 | ea_name = XATTR_NAME_POSIX_ACL_ACCESS; |
44 | break; | 44 | break; |
45 | case ACL_TYPE_DEFAULT: | 45 | case ACL_TYPE_DEFAULT: |
46 | ea_name = POSIX_ACL_XATTR_DEFAULT; | 46 | ea_name = XATTR_NAME_POSIX_ACL_DEFAULT; |
47 | break; | 47 | break; |
48 | default: | 48 | default: |
49 | return ERR_PTR(-EINVAL); | 49 | return ERR_PTR(-EINVAL); |
@@ -82,7 +82,7 @@ static int __jfs_set_acl(tid_t tid, struct inode *inode, int type, | |||
82 | 82 | ||
83 | switch (type) { | 83 | switch (type) { |
84 | case ACL_TYPE_ACCESS: | 84 | case ACL_TYPE_ACCESS: |
85 | ea_name = POSIX_ACL_XATTR_ACCESS; | 85 | ea_name = XATTR_NAME_POSIX_ACL_ACCESS; |
86 | if (acl) { | 86 | if (acl) { |
87 | rc = posix_acl_equiv_mode(acl, &inode->i_mode); | 87 | rc = posix_acl_equiv_mode(acl, &inode->i_mode); |
88 | if (rc < 0) | 88 | if (rc < 0) |
@@ -94,7 +94,7 @@ static int __jfs_set_acl(tid_t tid, struct inode *inode, int type, | |||
94 | } | 94 | } |
95 | break; | 95 | break; |
96 | case ACL_TYPE_DEFAULT: | 96 | case ACL_TYPE_DEFAULT: |
97 | ea_name = POSIX_ACL_XATTR_DEFAULT; | 97 | ea_name = XATTR_NAME_POSIX_ACL_DEFAULT; |
98 | break; | 98 | break; |
99 | default: | 99 | default: |
100 | return -EINVAL; | 100 | return -EINVAL; |
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index 1ebe2fc7cda2..17c0fa1eccfa 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c | |||
@@ -284,12 +284,12 @@ nfs3_listxattr(struct dentry *dentry, char *data, size_t size) | |||
284 | int error; | 284 | int error; |
285 | 285 | ||
286 | error = nfs3_list_one_acl(inode, ACL_TYPE_ACCESS, | 286 | error = nfs3_list_one_acl(inode, ACL_TYPE_ACCESS, |
287 | POSIX_ACL_XATTR_ACCESS, data, size, &result); | 287 | XATTR_NAME_POSIX_ACL_ACCESS, data, size, &result); |
288 | if (error) | 288 | if (error) |
289 | return error; | 289 | return error; |
290 | 290 | ||
291 | error = nfs3_list_one_acl(inode, ACL_TYPE_DEFAULT, | 291 | error = nfs3_list_one_acl(inode, ACL_TYPE_DEFAULT, |
292 | POSIX_ACL_XATTR_DEFAULT, data, size, &result); | 292 | XATTR_NAME_POSIX_ACL_DEFAULT, data, size, &result); |
293 | if (error) | 293 | if (error) |
294 | return error; | 294 | return error; |
295 | return result; | 295 | return result; |
diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 4adde1e2cbec..571465d6df58 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c | |||
@@ -845,7 +845,7 @@ posix_acl_xattr_list(const struct xattr_handler *handler, | |||
845 | } | 845 | } |
846 | 846 | ||
847 | const struct xattr_handler posix_acl_access_xattr_handler = { | 847 | const struct xattr_handler posix_acl_access_xattr_handler = { |
848 | .prefix = POSIX_ACL_XATTR_ACCESS, | 848 | .prefix = XATTR_NAME_POSIX_ACL_ACCESS, |
849 | .flags = ACL_TYPE_ACCESS, | 849 | .flags = ACL_TYPE_ACCESS, |
850 | .list = posix_acl_xattr_list, | 850 | .list = posix_acl_xattr_list, |
851 | .get = posix_acl_xattr_get, | 851 | .get = posix_acl_xattr_get, |
@@ -854,7 +854,7 @@ const struct xattr_handler posix_acl_access_xattr_handler = { | |||
854 | EXPORT_SYMBOL_GPL(posix_acl_access_xattr_handler); | 854 | EXPORT_SYMBOL_GPL(posix_acl_access_xattr_handler); |
855 | 855 | ||
856 | const struct xattr_handler posix_acl_default_xattr_handler = { | 856 | const struct xattr_handler posix_acl_default_xattr_handler = { |
857 | .prefix = POSIX_ACL_XATTR_DEFAULT, | 857 | .prefix = XATTR_NAME_POSIX_ACL_DEFAULT, |
858 | .flags = ACL_TYPE_DEFAULT, | 858 | .flags = ACL_TYPE_DEFAULT, |
859 | .list = posix_acl_xattr_list, | 859 | .list = posix_acl_xattr_list, |
860 | .get = posix_acl_xattr_get, | 860 | .get = posix_acl_xattr_get, |
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c index 4b34b9dc03dd..558a16beaacb 100644 --- a/fs/reiserfs/xattr_acl.c +++ b/fs/reiserfs/xattr_acl.c | |||
@@ -186,10 +186,10 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type) | |||
186 | 186 | ||
187 | switch (type) { | 187 | switch (type) { |
188 | case ACL_TYPE_ACCESS: | 188 | case ACL_TYPE_ACCESS: |
189 | name = POSIX_ACL_XATTR_ACCESS; | 189 | name = XATTR_NAME_POSIX_ACL_ACCESS; |
190 | break; | 190 | break; |
191 | case ACL_TYPE_DEFAULT: | 191 | case ACL_TYPE_DEFAULT: |
192 | name = POSIX_ACL_XATTR_DEFAULT; | 192 | name = XATTR_NAME_POSIX_ACL_DEFAULT; |
193 | break; | 193 | break; |
194 | default: | 194 | default: |
195 | BUG(); | 195 | BUG(); |
@@ -244,7 +244,7 @@ __reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode, | |||
244 | 244 | ||
245 | switch (type) { | 245 | switch (type) { |
246 | case ACL_TYPE_ACCESS: | 246 | case ACL_TYPE_ACCESS: |
247 | name = POSIX_ACL_XATTR_ACCESS; | 247 | name = XATTR_NAME_POSIX_ACL_ACCESS; |
248 | if (acl) { | 248 | if (acl) { |
249 | error = posix_acl_equiv_mode(acl, &inode->i_mode); | 249 | error = posix_acl_equiv_mode(acl, &inode->i_mode); |
250 | if (error < 0) | 250 | if (error < 0) |
@@ -256,7 +256,7 @@ __reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode, | |||
256 | } | 256 | } |
257 | break; | 257 | break; |
258 | case ACL_TYPE_DEFAULT: | 258 | case ACL_TYPE_DEFAULT: |
259 | name = POSIX_ACL_XATTR_DEFAULT; | 259 | name = XATTR_NAME_POSIX_ACL_DEFAULT; |
260 | if (!S_ISDIR(inode->i_mode)) | 260 | if (!S_ISDIR(inode->i_mode)) |
261 | return acl ? -EACCES : 0; | 261 | return acl ? -EACCES : 0; |
262 | break; | 262 | break; |
diff --git a/fs/xfs/xfs_xattr.c b/fs/xfs/xfs_xattr.c index 839b35ca21c6..7288795718c9 100644 --- a/fs/xfs/xfs_xattr.c +++ b/fs/xfs/xfs_xattr.c | |||
@@ -253,16 +253,16 @@ xfs_vn_listxattr(struct dentry *dentry, char *data, size_t size) | |||
253 | * Then add the two synthetic ACL attributes. | 253 | * Then add the two synthetic ACL attributes. |
254 | */ | 254 | */ |
255 | if (posix_acl_access_exists(inode)) { | 255 | if (posix_acl_access_exists(inode)) { |
256 | error = list_one_attr(POSIX_ACL_XATTR_ACCESS, | 256 | error = list_one_attr(XATTR_NAME_POSIX_ACL_ACCESS, |
257 | strlen(POSIX_ACL_XATTR_ACCESS) + 1, | 257 | strlen(XATTR_NAME_POSIX_ACL_ACCESS) + 1, |
258 | data, size, &context.count); | 258 | data, size, &context.count); |
259 | if (error) | 259 | if (error) |
260 | return error; | 260 | return error; |
261 | } | 261 | } |
262 | 262 | ||
263 | if (posix_acl_default_exists(inode)) { | 263 | if (posix_acl_default_exists(inode)) { |
264 | error = list_one_attr(POSIX_ACL_XATTR_DEFAULT, | 264 | error = list_one_attr(XATTR_NAME_POSIX_ACL_DEFAULT, |
265 | strlen(POSIX_ACL_XATTR_DEFAULT) + 1, | 265 | strlen(XATTR_NAME_POSIX_ACL_DEFAULT) + 1, |
266 | data, size, &context.count); | 266 | data, size, &context.count); |
267 | if (error) | 267 | if (error) |
268 | return error; | 268 | return error; |
diff --git a/include/linux/posix_acl_xattr.h b/include/linux/posix_acl_xattr.h index 6f14ee295822..e5e8ec40278d 100644 --- a/include/linux/posix_acl_xattr.h +++ b/include/linux/posix_acl_xattr.h | |||
@@ -9,16 +9,12 @@ | |||
9 | #ifndef _POSIX_ACL_XATTR_H | 9 | #ifndef _POSIX_ACL_XATTR_H |
10 | #define _POSIX_ACL_XATTR_H | 10 | #define _POSIX_ACL_XATTR_H |
11 | 11 | ||
12 | #include <uapi/linux/xattr.h> | ||
12 | #include <linux/posix_acl.h> | 13 | #include <linux/posix_acl.h> |
13 | 14 | ||
14 | /* Extended attribute names */ | ||
15 | #define POSIX_ACL_XATTR_ACCESS "system.posix_acl_access" | ||
16 | #define POSIX_ACL_XATTR_DEFAULT "system.posix_acl_default" | ||
17 | |||
18 | /* Supported ACL a_version fields */ | 15 | /* Supported ACL a_version fields */ |
19 | #define POSIX_ACL_XATTR_VERSION 0x0002 | 16 | #define POSIX_ACL_XATTR_VERSION 0x0002 |
20 | 17 | ||
21 | |||
22 | /* An undefined entry e_id value */ | 18 | /* An undefined entry e_id value */ |
23 | #define ACL_UNDEFINED_ID (-1) | 19 | #define ACL_UNDEFINED_ID (-1) |
24 | 20 | ||