Lines Matching defs:acl
60 struct posix_acl *acl;
81 acl = posix_acl_alloc(count, GFP_KERNEL);
82 if (!acl)
89 acl->a_entries[i].e_tag = je16_to_cpu(entry->e_tag);
90 acl->a_entries[i].e_perm = je16_to_cpu(entry->e_perm);
91 switch (acl->a_entries[i].e_tag) {
103 acl->a_entries[i].e_uid =
111 acl->a_entries[i].e_gid =
122 return acl;
124 posix_acl_release(acl);
128 static void *jffs2_acl_to_medium(const struct posix_acl *acl, size_t *size)
135 *size = jffs2_acl_size(acl->a_count);
136 header = kmalloc(struct_size(header, a_entries, acl->a_count),
142 for (i=0; i < acl->a_count; i++) {
143 const struct posix_acl_entry *acl_e = &acl->a_entries[i];
178 struct posix_acl *acl;
200 acl = jffs2_acl_from_medium(value, rc);
202 acl = NULL;
204 acl = ERR_PTR(rc);
207 return acl;
210 static int __jffs2_set_acl(struct inode *inode, int xprefix, struct posix_acl *acl)
216 if (acl) {
217 value = jffs2_acl_to_medium(acl, &size);
229 int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
236 if (acl) {
239 rc = posix_acl_update_mode(inode, &mode, &acl);
257 return acl ? -EACCES : 0;
262 rc = __jffs2_set_acl(inode, xprefix, acl);
264 set_cached_acl(inode, type, acl);
270 struct posix_acl *default_acl, *acl;
275 rc = posix_acl_create(dir_i, i_mode, &default_acl, &acl);
283 if (acl) {
284 set_cached_acl(inode, ACL_TYPE_ACCESS, acl);
285 posix_acl_release(acl);