• Home
  • Raw
  • Download

Lines Matching refs:acl

38 	struct posix_acl *acl;  in ocfs2_acl_from_xattr()  local
47 acl = posix_acl_alloc(count, GFP_NOFS); in ocfs2_acl_from_xattr()
48 if (!acl) in ocfs2_acl_from_xattr()
54 acl->a_entries[n].e_tag = le16_to_cpu(entry->e_tag); in ocfs2_acl_from_xattr()
55 acl->a_entries[n].e_perm = le16_to_cpu(entry->e_perm); in ocfs2_acl_from_xattr()
56 switch(acl->a_entries[n].e_tag) { in ocfs2_acl_from_xattr()
58 acl->a_entries[n].e_uid = in ocfs2_acl_from_xattr()
63 acl->a_entries[n].e_gid = in ocfs2_acl_from_xattr()
73 return acl; in ocfs2_acl_from_xattr()
79 static void *ocfs2_acl_to_xattr(const struct posix_acl *acl, size_t *size) in ocfs2_acl_to_xattr() argument
85 *size = acl->a_count * sizeof(struct posix_acl_entry); in ocfs2_acl_to_xattr()
92 for (n = 0; n < acl->a_count; n++, entry++) { in ocfs2_acl_to_xattr()
93 entry->e_tag = cpu_to_le16(acl->a_entries[n].e_tag); in ocfs2_acl_to_xattr()
94 entry->e_perm = cpu_to_le16(acl->a_entries[n].e_perm); in ocfs2_acl_to_xattr()
95 switch(acl->a_entries[n].e_tag) { in ocfs2_acl_to_xattr()
99 acl->a_entries[n].e_uid)); in ocfs2_acl_to_xattr()
104 acl->a_entries[n].e_gid)); in ocfs2_acl_to_xattr()
120 struct posix_acl *acl; in ocfs2_get_acl_nolock() local
144 acl = ocfs2_acl_from_xattr(value, retval); in ocfs2_get_acl_nolock()
146 acl = NULL; in ocfs2_get_acl_nolock()
148 acl = ERR_PTR(retval); in ocfs2_get_acl_nolock()
152 return acl; in ocfs2_get_acl_nolock()
220 struct posix_acl *acl, in ocfs2_set_acl() argument
239 return acl ? -EACCES : 0; in ocfs2_set_acl()
245 if (acl) { in ocfs2_set_acl()
246 value = ocfs2_acl_to_xattr(acl, &size); in ocfs2_set_acl()
263 int ocfs2_iop_set_acl(struct inode *inode, struct posix_acl *acl, int type) in ocfs2_iop_set_acl() argument
272 if (type == ACL_TYPE_ACCESS && acl) { in ocfs2_iop_set_acl()
275 status = posix_acl_update_mode(inode, &mode, &acl); in ocfs2_iop_set_acl()
283 status = ocfs2_set_acl(NULL, inode, bh, type, acl, NULL, NULL); in ocfs2_iop_set_acl()
294 struct posix_acl *acl; in ocfs2_iop_get_acl() local
307 acl = ocfs2_get_acl_nolock(inode, type, di_bh); in ocfs2_iop_get_acl()
312 return acl; in ocfs2_iop_get_acl()
318 struct posix_acl *acl; in ocfs2_acl_chmod() local
328 acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, bh); in ocfs2_acl_chmod()
330 if (IS_ERR_OR_NULL(acl)) in ocfs2_acl_chmod()
331 return PTR_ERR_OR_ZERO(acl); in ocfs2_acl_chmod()
332 ret = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); in ocfs2_acl_chmod()
336 acl, NULL, NULL); in ocfs2_acl_chmod()
337 posix_acl_release(acl); in ocfs2_acl_chmod()
354 struct posix_acl *acl = NULL; in ocfs2_init_acl() local
361 acl = ocfs2_get_acl_nolock(dir, ACL_TYPE_DEFAULT, in ocfs2_init_acl()
364 if (IS_ERR(acl)) in ocfs2_init_acl()
365 return PTR_ERR(acl); in ocfs2_init_acl()
367 if (!acl) { in ocfs2_init_acl()
376 if ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) && acl) { in ocfs2_init_acl()
379 ACL_TYPE_DEFAULT, acl, in ocfs2_init_acl()
385 ret = __posix_acl_create(&acl, GFP_NOFS, &mode); in ocfs2_init_acl()
398 acl, meta_ac, data_ac); in ocfs2_init_acl()
402 posix_acl_release(acl); in ocfs2_init_acl()