Lines Matching defs:acl

3  * fs/f2fs/acl.c
8 * Portions of this code from linux/fs/ext2/acl.c
15 #include "acl.h"
49 struct posix_acl *acl;
66 acl = posix_acl_alloc(count, GFP_NOFS);
67 if (!acl)
75 acl->a_entries[i].e_tag = le16_to_cpu(entry->e_tag);
76 acl->a_entries[i].e_perm = le16_to_cpu(entry->e_perm);
78 switch (acl->a_entries[i].e_tag) {
88 acl->a_entries[i].e_uid =
95 acl->a_entries[i].e_gid =
107 return acl;
109 posix_acl_release(acl);
114 const struct posix_acl *acl, size_t *size)
121 acl->a_count * sizeof(struct f2fs_acl_entry),
129 for (i = 0; i < acl->a_count; i++) {
131 entry->e_tag = cpu_to_le16(acl->a_entries[i].e_tag);
132 entry->e_perm = cpu_to_le16(acl->a_entries[i].e_perm);
134 switch (acl->a_entries[i].e_tag) {
138 acl->a_entries[i].e_uid));
145 acl->a_entries[i].e_gid));
160 *size = f2fs_acl_size(acl->a_count);
173 struct posix_acl *acl;
189 acl = f2fs_acl_from_disk(value, retval);
191 acl = NULL;
193 acl = ERR_PTR(retval);
196 return acl;
209 struct posix_acl **acl)
217 error = posix_acl_equiv_mode(*acl, &mode);
221 *acl = NULL;
231 struct posix_acl *acl, struct page *ipage)
242 if (acl && !ipage) {
244 &mode, &acl);
254 return acl ? -EACCES : 0;
261 if (acl) {
262 value = f2fs_acl_to_disk(F2FS_I_SB(inode), acl, &size);
273 set_cached_acl(inode, type, acl);
280 struct posix_acl *acl, int type)
287 return __f2fs_set_acl(idmap, inode, type, acl, NULL);
294 static struct posix_acl *f2fs_acl_clone(const struct posix_acl *acl,
299 if (acl) {
300 int size = sizeof(struct posix_acl) + acl->a_count *
302 clone = kmemdup(acl, size, flags);
309 static int f2fs_acl_create_masq(struct posix_acl *acl, umode_t *mode_p)
316 /* assert(atomic_read(acl->a_refcount) == 1); */
318 FOREACH_ACL_ENTRY(pa, acl, pe) {
364 struct posix_acl **default_acl, struct posix_acl **acl,
371 *acl = NULL;
398 *acl = clone;
417 struct posix_acl *default_acl = NULL, *acl = NULL;
420 error = f2fs_acl_create(dir, &inode->i_mode, &default_acl, &acl, dpage);
433 if (acl) {
435 error = __f2fs_set_acl(NULL, inode, ACL_TYPE_ACCESS, acl,
437 posix_acl_release(acl);