Lines Matching refs:acl

60 	struct posix_acl *acl;  in jffs2_acl_from_medium()  local
81 acl = posix_acl_alloc(count, GFP_KERNEL); in jffs2_acl_from_medium()
82 if (!acl) in jffs2_acl_from_medium()
89 acl->a_entries[i].e_tag = je16_to_cpu(entry->e_tag); in jffs2_acl_from_medium()
90 acl->a_entries[i].e_perm = je16_to_cpu(entry->e_perm); in jffs2_acl_from_medium()
91 switch (acl->a_entries[i].e_tag) { in jffs2_acl_from_medium()
103 acl->a_entries[i].e_uid = in jffs2_acl_from_medium()
111 acl->a_entries[i].e_gid = in jffs2_acl_from_medium()
122 return acl; in jffs2_acl_from_medium()
124 posix_acl_release(acl); in jffs2_acl_from_medium()
128 static void *jffs2_acl_to_medium(const struct posix_acl *acl, size_t *size) in jffs2_acl_to_medium() argument
135 *size = jffs2_acl_size(acl->a_count); in jffs2_acl_to_medium()
136 header = kmalloc(struct_size(header, a_entries, acl->a_count), in jffs2_acl_to_medium()
142 for (i=0; i < acl->a_count; i++) { in jffs2_acl_to_medium()
143 const struct posix_acl_entry *acl_e = &acl->a_entries[i]; in jffs2_acl_to_medium()
178 struct posix_acl *acl; in jffs2_get_acl() local
203 acl = jffs2_acl_from_medium(value, rc); in jffs2_get_acl()
205 acl = NULL; in jffs2_get_acl()
207 acl = ERR_PTR(rc); in jffs2_get_acl()
210 return acl; in jffs2_get_acl()
213 static int __jffs2_set_acl(struct inode *inode, int xprefix, struct posix_acl *acl) in __jffs2_set_acl() argument
219 if (acl) { in __jffs2_set_acl()
220 value = jffs2_acl_to_medium(acl, &size); in __jffs2_set_acl()
233 struct posix_acl *acl, int type) in jffs2_set_acl() argument
241 if (acl) { in jffs2_set_acl()
245 &acl); in jffs2_set_acl()
263 return acl ? -EACCES : 0; in jffs2_set_acl()
268 rc = __jffs2_set_acl(inode, xprefix, acl); in jffs2_set_acl()
270 set_cached_acl(inode, type, acl); in jffs2_set_acl()
276 struct posix_acl *default_acl, *acl; in jffs2_init_acl_pre() local
281 rc = posix_acl_create(dir_i, i_mode, &default_acl, &acl); in jffs2_init_acl_pre()
289 if (acl) { in jffs2_init_acl_pre()
290 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in jffs2_init_acl_pre()
291 posix_acl_release(acl); in jffs2_init_acl_pre()