• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/ext4/

Lines Matching refs:acl

2  * linux/fs/ext4/acl.c
15 #include "acl.h"
25 struct posix_acl *acl;
40 acl = posix_acl_alloc(count, GFP_NOFS);
41 if (!acl)
48 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag);
49 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm);
51 switch (acl->a_entries[n].e_tag) {
58 acl->a_entries[n].e_id = ACL_UNDEFINED_ID;
66 acl->a_entries[n].e_id =
76 return acl;
79 posix_acl_release(acl);
87 ext4_acl_to_disk(const struct posix_acl *acl, size_t *size)
93 *size = ext4_acl_size(acl->a_count);
94 ext_acl = kmalloc(sizeof(ext4_acl_header) + acl->a_count *
100 for (n = 0; n < acl->a_count; n++) {
102 entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag);
103 entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm);
104 switch (acl->a_entries[n].e_tag) {
107 entry->e_id = cpu_to_le32(acl->a_entries[n].e_id);
139 struct posix_acl *acl;
145 acl = get_cached_acl(inode, type);
146 if (acl != ACL_NOT_CACHED)
147 return acl;
167 acl = ext4_acl_from_disk(value, retval);
169 acl = NULL;
171 acl = ERR_PTR(retval);
174 if (!IS_ERR(acl))
175 set_cached_acl(inode, type, acl);
177 return acl;
187 struct posix_acl *acl)
200 if (acl) {
202 error = posix_acl_equiv_mode(acl, &mode);
210 acl = NULL;
218 return acl ? -EACCES : 0;
224 if (acl) {
225 value = ext4_acl_to_disk(acl, &size);
235 set_cached_acl(inode, type, acl);
243 struct posix_acl *acl = ext4_get_acl(inode, ACL_TYPE_ACCESS);
245 if (IS_ERR(acl))
246 return PTR_ERR(acl);
247 if (acl) {
248 int error = posix_acl_permission(inode, acl, mask);
249 posix_acl_release(acl);
265 struct posix_acl *acl = NULL;
270 acl = ext4_get_acl(dir, ACL_TYPE_DEFAULT);
271 if (IS_ERR(acl))
272 return PTR_ERR(acl);
274 if (!acl)
277 if (test_opt(inode->i_sb, POSIX_ACL) && acl) {
283 ACL_TYPE_DEFAULT, acl);
287 clone = posix_acl_clone(acl, GFP_NOFS);
305 posix_acl_release(acl);
326 struct posix_acl *acl, *clone;
333 acl = ext4_get_acl(inode, ACL_TYPE_ACCESS);
334 if (IS_ERR(acl) || !acl)
335 return PTR_ERR(acl);
336 clone = posix_acl_clone(acl, GFP_KERNEL);
337 posix_acl_release(acl);
397 struct posix_acl *acl;
405 acl = ext4_get_acl(dentry->d_inode, type);
406 if (IS_ERR(acl))
407 return PTR_ERR(acl);
408 if (acl == NULL)
410 error = posix_acl_to_xattr(acl, buffer, size);
411 posix_acl_release(acl);
422 struct posix_acl *acl;
433 acl = posix_acl_from_xattr(value, size);
434 if (IS_ERR(acl))
435 return PTR_ERR(acl);
436 else if (acl) {
437 error = posix_acl_valid(acl);
442 acl = NULL;
448 error = ext4_set_acl(handle, inode, type, acl);
454 posix_acl_release(acl);