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

Lines Matching refs:acl

4  * acl.c
9 * Lots of code in this file is copy from linux/fs/ext3/acl.c.
39 #include "acl.h"
42 * Convert from xattr value to acl struct.
47 struct posix_acl *acl;
60 acl = posix_acl_alloc(count, GFP_NOFS);
61 if (!acl)
67 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag);
68 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm);
69 acl->a_entries[n].e_id = le32_to_cpu(entry->e_id);
73 return acl;
77 * Convert acl struct to xattr value.
79 static void *ocfs2_acl_to_xattr(const struct posix_acl *acl, size_t *size)
85 *size = acl->a_count * sizeof(struct posix_acl_entry);
92 for (n = 0; n < acl->a_count; n++, entry++) {
93 entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag);
94 entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm);
95 entry->e_id = cpu_to_le32(acl->a_entries[n].e_id);
106 struct posix_acl *acl;
130 acl = ocfs2_acl_from_xattr(value, retval);
132 acl = NULL;
134 acl = ERR_PTR(retval);
138 return acl;
143 * Get posix acl.
149 struct posix_acl *acl;
158 acl = ERR_PTR(ret);
159 return acl;
162 acl = ocfs2_get_acl_nolock(inode, type, di_bh);
168 return acl;
235 struct posix_acl *acl,
250 if (acl) {
252 ret = posix_acl_equiv_mode(acl, &mode);
257 acl = NULL;
270 return acl ? -EACCES : 0;
276 if (acl) {
277 value = ocfs2_acl_to_xattr(acl, &size);
298 struct posix_acl *acl;
310 acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, di_bh);
314 if (IS_ERR(acl)) {
315 mlog_errno(PTR_ERR(acl));
316 return PTR_ERR(acl);
318 if (acl) {
319 ret = posix_acl_permission(inode, acl, mask);
320 posix_acl_release(acl);
330 struct posix_acl *acl, *clone;
339 acl = ocfs2_get_acl(inode, ACL_TYPE_ACCESS);
340 if (IS_ERR(acl) || !acl)
341 return PTR_ERR(acl);
342 clone = posix_acl_clone(acl, GFP_KERNEL);
343 posix_acl_release(acl);
367 struct posix_acl *acl = NULL;
373 acl = ocfs2_get_acl_nolock(dir, ACL_TYPE_DEFAULT,
375 if (IS_ERR(acl))
376 return PTR_ERR(acl);
378 if (!acl) {
387 if ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) && acl) {
392 ACL_TYPE_DEFAULT, acl,
397 clone = posix_acl_clone(acl, GFP_NOFS);
420 posix_acl_release(acl);
464 struct posix_acl *acl;
472 acl = ocfs2_get_acl(dentry->d_inode, type);
473 if (IS_ERR(acl))
474 return PTR_ERR(acl);
475 if (acl == NULL)
477 ret = posix_acl_to_xattr(acl, buffer, size);
478 posix_acl_release(acl);
488 struct posix_acl *acl;
500 acl = posix_acl_from_xattr(value, size);
501 if (IS_ERR(acl))
502 return PTR_ERR(acl);
503 else if (acl) {
504 ret = posix_acl_valid(acl);
509 acl = NULL;
511 ret = ocfs2_set_acl(NULL, inode, NULL, type, acl, NULL, NULL);
514 posix_acl_release(acl);