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 /fs/ceph | |
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>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/acl.c | 16 |
1 files changed, 8 insertions, 8 deletions
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) |