Lines Matching defs:acl

3  * acl.c
8 * Lots of code in this file is copy from linux/fs/ext3/acl.c.
28 #include "acl.h"
31 * Convert from xattr value to acl struct.
36 struct posix_acl *acl;
45 acl = posix_acl_alloc(count, GFP_NOFS);
46 if (!acl)
52 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag);
53 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm);
54 switch(acl->a_entries[n].e_tag) {
56 acl->a_entries[n].e_uid =
61 acl->a_entries[n].e_gid =
71 return acl;
75 * Convert acl struct to xattr value.
77 static void *ocfs2_acl_to_xattr(const struct posix_acl *acl, size_t *size)
83 *size = acl->a_count * sizeof(struct posix_acl_entry);
90 for (n = 0; n < acl->a_count; n++, entry++) {
91 entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag);
92 entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm);
93 switch(acl->a_entries[n].e_tag) {
97 acl->a_entries[n].e_uid));
102 acl->a_entries[n].e_gid));
118 struct posix_acl *acl;
142 acl = ocfs2_acl_from_xattr(value, retval);
144 acl = NULL;
146 acl = ERR_PTR(retval);
150 return acl;
218 struct posix_acl *acl,
237 return acl ? -EACCES : 0;
243 if (acl) {
244 value = ocfs2_acl_to_xattr(acl, &size);
258 set_cached_acl(inode, type, acl);
264 struct posix_acl *acl, int type)
274 if (type == ACL_TYPE_ACCESS && acl) {
278 &acl);
286 status = ocfs2_set_acl(NULL, inode, bh, type, acl, NULL, NULL);
297 struct posix_acl *acl;
313 acl = ocfs2_get_acl_nolock(inode, type, di_bh);
318 return acl;
324 struct posix_acl *acl;
334 acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, bh);
336 if (IS_ERR_OR_NULL(acl))
337 return PTR_ERR_OR_ZERO(acl);
338 ret = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
342 acl, NULL, NULL);
343 posix_acl_release(acl);
360 struct posix_acl *acl = NULL;
367 acl = ocfs2_get_acl_nolock(dir, ACL_TYPE_DEFAULT,
370 if (IS_ERR(acl))
371 return PTR_ERR(acl);
373 if (!acl) {
382 if ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) && acl) {
385 ACL_TYPE_DEFAULT, acl,
391 ret = __posix_acl_create(&acl, GFP_NOFS, &mode);
404 acl, meta_ac, data_ac);
408 posix_acl_release(acl);