• Home
  • Raw
  • Download

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(sizeof(*header) + acl->a_count * sizeof(*entry), GFP_KERNEL); in jffs2_acl_to_medium()
141 for (i=0; i < acl->a_count; i++) { in jffs2_acl_to_medium()
142 const struct posix_acl_entry *acl_e = &acl->a_entries[i]; in jffs2_acl_to_medium()
177 struct posix_acl *acl; in jffs2_get_acl() local
199 acl = jffs2_acl_from_medium(value, rc); in jffs2_get_acl()
201 acl = NULL; in jffs2_get_acl()
203 acl = ERR_PTR(rc); in jffs2_get_acl()
206 if (!IS_ERR(acl)) in jffs2_get_acl()
207 set_cached_acl(inode, type, acl); in jffs2_get_acl()
208 return acl; in jffs2_get_acl()
211 static int __jffs2_set_acl(struct inode *inode, int xprefix, struct posix_acl *acl) in __jffs2_set_acl() argument
217 if (acl) { in __jffs2_set_acl()
218 value = jffs2_acl_to_medium(acl, &size); in __jffs2_set_acl()
230 int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) in jffs2_set_acl() argument
237 if (acl) { in jffs2_set_acl()
240 rc = posix_acl_update_mode(inode, &mode, &acl); in jffs2_set_acl()
258 return acl ? -EACCES : 0; in jffs2_set_acl()
263 rc = __jffs2_set_acl(inode, xprefix, acl); in jffs2_set_acl()
265 set_cached_acl(inode, type, acl); in jffs2_set_acl()
271 struct posix_acl *default_acl, *acl; in jffs2_init_acl_pre() local
276 rc = posix_acl_create(dir_i, i_mode, &default_acl, &acl); in jffs2_init_acl_pre()
284 if (acl) { in jffs2_init_acl_pre()
285 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in jffs2_init_acl_pre()
286 posix_acl_release(acl); in jffs2_init_acl_pre()