Lines Matching defs:acl
3 * fs/f2fs/acl.c
8 * Portions of this code from linux/fs/ext2/acl.c
15 #include "acl.h"
48 struct posix_acl *acl;
65 acl = posix_acl_alloc(count, GFP_NOFS);
66 if (!acl)
74 acl->a_entries[i].e_tag = le16_to_cpu(entry->e_tag);
75 acl->a_entries[i].e_perm = le16_to_cpu(entry->e_perm);
77 switch (acl->a_entries[i].e_tag) {
87 acl->a_entries[i].e_uid =
94 acl->a_entries[i].e_gid =
106 return acl;
108 posix_acl_release(acl);
113 const struct posix_acl *acl, size_t *size)
120 acl->a_count * sizeof(struct f2fs_acl_entry),
128 for (i = 0; i < acl->a_count; i++) {
130 entry->e_tag = cpu_to_le16(acl->a_entries[i].e_tag);
131 entry->e_perm = cpu_to_le16(acl->a_entries[i].e_perm);
133 switch (acl->a_entries[i].e_tag) {
137 acl->a_entries[i].e_uid));
144 acl->a_entries[i].e_gid));
159 *size = f2fs_acl_size(acl->a_count);
172 struct posix_acl *acl;
188 acl = f2fs_acl_from_disk(value, retval);
190 acl = NULL;
192 acl = ERR_PTR(retval);
195 return acl;
204 struct posix_acl *acl, struct page *ipage)
215 if (acl && !ipage) {
216 error = posix_acl_update_mode(inode, &mode, &acl);
226 return acl ? -EACCES : 0;
233 if (acl) {
234 value = f2fs_acl_to_disk(F2FS_I_SB(inode), acl, &size);
245 set_cached_acl(inode, type, acl);
251 int f2fs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
256 return __f2fs_set_acl(inode, type, acl, NULL);
263 static struct posix_acl *f2fs_acl_clone(const struct posix_acl *acl,
268 if (acl) {
269 int size = sizeof(struct posix_acl) + acl->a_count *
271 clone = kmemdup(acl, size, flags);
278 static int f2fs_acl_create_masq(struct posix_acl *acl, umode_t *mode_p)
285 /* assert(atomic_read(acl->a_refcount) == 1); */
287 FOREACH_ACL_ENTRY(pa, acl, pe) {
333 struct posix_acl **default_acl, struct posix_acl **acl,
340 *acl = NULL;
367 *acl = clone;
386 struct posix_acl *default_acl = NULL, *acl = NULL;
389 error = f2fs_acl_create(dir, &inode->i_mode, &default_acl, &acl, dpage);
402 if (acl) {
404 error = __f2fs_set_acl(inode, ACL_TYPE_ACCESS, acl,
406 posix_acl_release(acl);