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
200 acl = jffs2_acl_from_medium(value, rc); in jffs2_get_acl()
202 acl = NULL; in jffs2_get_acl()
204 acl = ERR_PTR(rc); in jffs2_get_acl()
207 return acl; in jffs2_get_acl()
210 static int __jffs2_set_acl(struct inode *inode, int xprefix, struct posix_acl *acl) in __jffs2_set_acl() argument
216 if (acl) { in __jffs2_set_acl()
217 value = jffs2_acl_to_medium(acl, &size); in __jffs2_set_acl()
229 int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) in jffs2_set_acl() argument
236 if (acl) { in jffs2_set_acl()
239 rc = posix_acl_update_mode(inode, &mode, &acl); in jffs2_set_acl()
257 return acl ? -EACCES : 0; in jffs2_set_acl()
262 rc = __jffs2_set_acl(inode, xprefix, acl); in jffs2_set_acl()
264 set_cached_acl(inode, type, acl); in jffs2_set_acl()
270 struct posix_acl *default_acl, *acl; in jffs2_init_acl_pre() local
275 rc = posix_acl_create(dir_i, i_mode, &default_acl, &acl); in jffs2_init_acl_pre()
283 if (acl) { in jffs2_init_acl_pre()
284 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in jffs2_init_acl_pre()
285 posix_acl_release(acl); in jffs2_init_acl_pre()