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

Lines Matching refs:acl

2  * linux/fs/ext3/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);
50 switch(acl->a_entries[n].e_tag) {
57 acl->a_entries[n].e_id = ACL_UNDEFINED_ID;
65 acl->a_entries[n].e_id =
75 return acl;
78 posix_acl_release(acl);
86 ext3_acl_to_disk(const struct posix_acl *acl, size_t *size)
92 *size = ext3_acl_size(acl->a_count);
93 ext_acl = kmalloc(sizeof(ext3_acl_header) + acl->a_count *
99 for (n=0; n < acl->a_count; n++) {
101 entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag);
102 entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm);
103 switch(acl->a_entries[n].e_tag) {
107 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;
168 acl = ext3_acl_from_disk(value, retval);
170 acl = NULL;
172 acl = ERR_PTR(retval);
175 if (!IS_ERR(acl))
176 set_cached_acl(inode, type, acl);
178 return acl;
188 struct posix_acl *acl)
201 if (acl) {
203 error = posix_acl_equiv_mode(acl, &mode);
211 acl = NULL;
219 return acl ? -EACCES : 0;
225 if (acl) {
226 value = ext3_acl_to_disk(acl, &size);
237 set_cached_acl(inode, type, acl);
245 struct posix_acl *acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
247 if (IS_ERR(acl))
248 return PTR_ERR(acl);
249 if (acl) {
250 int error = posix_acl_permission(inode, acl, mask);
251 posix_acl_release(acl);
267 struct posix_acl *acl = NULL;
272 acl = ext3_get_acl(dir, ACL_TYPE_DEFAULT);
273 if (IS_ERR(acl))
274 return PTR_ERR(acl);
276 if (!acl)
279 if (test_opt(inode->i_sb, POSIX_ACL) && acl) {
285 ACL_TYPE_DEFAULT, acl);
289 clone = posix_acl_clone(acl, GFP_NOFS);
307 posix_acl_release(acl);
328 struct posix_acl *acl, *clone;
335 acl = ext3_get_acl(inode, ACL_TYPE_ACCESS);
336 if (IS_ERR(acl) || !acl)
337 return PTR_ERR(acl);
338 clone = posix_acl_clone(acl, GFP_KERNEL);
339 posix_acl_release(acl);
399 struct posix_acl *acl;
407 acl = ext3_get_acl(dentry->d_inode, type);
408 if (IS_ERR(acl))
409 return PTR_ERR(acl);
410 if (acl == NULL)
412 error = posix_acl_to_xattr(acl, buffer, size);
413 posix_acl_release(acl);
424 struct posix_acl *acl;
435 acl = posix_acl_from_xattr(value, size);
436 if (IS_ERR(acl))
437 return PTR_ERR(acl);
438 else if (acl) {
439 error = posix_acl_valid(acl);
444 acl = NULL;
450 error = ext3_set_acl(handle, inode, type, acl);
456 posix_acl_release(acl);