Lines Matching refs:acl
17 struct posix_acl *acl);
21 reiserfs_set_acl(struct inode *inode, struct posix_acl *acl, int type) in reiserfs_set_acl() argument
26 int size = acl ? posix_acl_xattr_size(acl->a_count) : 0; in reiserfs_set_acl()
42 if (type == ACL_TYPE_ACCESS && acl) { in reiserfs_set_acl()
43 error = posix_acl_update_mode(inode, &mode, &acl); in reiserfs_set_acl()
48 error = __reiserfs_set_acl(&th, inode, type, acl); in reiserfs_set_acl()
69 struct posix_acl *acl; in reiserfs_posix_acl_from_disk() local
84 acl = posix_acl_alloc(count, GFP_NOFS); in reiserfs_posix_acl_from_disk()
85 if (!acl) in reiserfs_posix_acl_from_disk()
91 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in reiserfs_posix_acl_from_disk()
92 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in reiserfs_posix_acl_from_disk()
93 switch (acl->a_entries[n].e_tag) { in reiserfs_posix_acl_from_disk()
106 acl->a_entries[n].e_uid = in reiserfs_posix_acl_from_disk()
114 acl->a_entries[n].e_gid = in reiserfs_posix_acl_from_disk()
125 return acl; in reiserfs_posix_acl_from_disk()
128 posix_acl_release(acl); in reiserfs_posix_acl_from_disk()
135 static void *reiserfs_posix_acl_to_disk(const struct posix_acl *acl, size_t * size) in reiserfs_posix_acl_to_disk() argument
141 *size = reiserfs_acl_size(acl->a_count); in reiserfs_posix_acl_to_disk()
143 acl->a_count * in reiserfs_posix_acl_to_disk()
150 for (n = 0; n < acl->a_count; n++) { in reiserfs_posix_acl_to_disk()
151 const struct posix_acl_entry *acl_e = &acl->a_entries[n]; in reiserfs_posix_acl_to_disk()
153 entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag); in reiserfs_posix_acl_to_disk()
154 entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm); in reiserfs_posix_acl_to_disk()
155 switch (acl->a_entries[n].e_tag) { in reiserfs_posix_acl_to_disk()
194 struct posix_acl *acl; in reiserfs_get_acl() local
226 acl = NULL; in reiserfs_get_acl()
228 acl = ERR_PTR(retval); in reiserfs_get_acl()
230 acl = reiserfs_posix_acl_from_disk(value, retval); in reiserfs_get_acl()
234 return acl; in reiserfs_get_acl()
245 int type, struct posix_acl *acl) in __reiserfs_set_acl() argument
259 return acl ? -EACCES : 0; in __reiserfs_set_acl()
265 if (acl) { in __reiserfs_set_acl()
266 value = reiserfs_posix_acl_to_disk(acl, &size); in __reiserfs_set_acl()
290 set_cached_acl(inode, type, acl); in __reiserfs_set_acl()
304 struct posix_acl *default_acl, *acl; in reiserfs_inherit_default_acl() local
326 err = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl); in reiserfs_inherit_default_acl()
335 if (acl) { in reiserfs_inherit_default_acl()
338 acl); in reiserfs_inherit_default_acl()
339 posix_acl_release(acl); in reiserfs_inherit_default_acl()
363 struct posix_acl *acl; in reiserfs_cache_default_acl() local
369 acl = get_acl(inode, ACL_TYPE_DEFAULT); in reiserfs_cache_default_acl()
371 if (acl && !IS_ERR(acl)) { in reiserfs_cache_default_acl()
372 int size = reiserfs_acl_size(acl->a_count); in reiserfs_cache_default_acl()
385 posix_acl_release(acl); in reiserfs_cache_default_acl()