Lines Matching refs:acl
33 int type, struct posix_acl *acl) in ceph_set_cached_acl() argument
39 set_cached_acl(inode, type, acl); in ceph_set_cached_acl()
48 struct posix_acl *acl; in ceph_get_acl() local
70 acl = posix_acl_from_xattr(&init_user_ns, value, size); in ceph_get_acl()
72 acl = NULL; in ceph_get_acl()
74 acl = ERR_PTR(-EIO); in ceph_get_acl()
78 if (!IS_ERR(acl)) in ceph_get_acl()
79 ceph_set_cached_acl(inode, type, acl); in ceph_get_acl()
81 return acl; in ceph_get_acl()
84 int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type) in ceph_set_acl() argument
96 if (acl) { in ceph_set_acl()
97 ret = posix_acl_equiv_mode(acl, &new_mode); in ceph_set_acl()
101 acl = NULL; in ceph_set_acl()
106 ret = acl ? -EINVAL : 0; in ceph_set_acl()
116 if (acl) { in ceph_set_acl()
117 size = posix_acl_xattr_size(acl->a_count); in ceph_set_acl()
124 ret = posix_acl_to_xattr(&init_user_ns, acl, value, size); in ceph_set_acl()
148 ceph_set_cached_acl(inode, type, acl); in ceph_set_acl()
161 struct posix_acl *acl, *default_acl; in ceph_pre_init_acls() local
167 err = posix_acl_create(dir, mode, &default_acl, &acl); in ceph_pre_init_acls()
171 if (acl) { in ceph_pre_init_acls()
172 int ret = posix_acl_equiv_mode(acl, mode); in ceph_pre_init_acls()
176 posix_acl_release(acl); in ceph_pre_init_acls()
177 acl = NULL; in ceph_pre_init_acls()
181 if (!default_acl && !acl) in ceph_pre_init_acls()
184 if (acl) in ceph_pre_init_acls()
185 val_size1 = posix_acl_xattr_size(acl->a_count); in ceph_pre_init_acls()
202 ceph_pagelist_encode_32(pagelist, acl && default_acl ? 2 : 1); in ceph_pre_init_acls()
204 if (acl) { in ceph_pre_init_acls()
211 err = posix_acl_to_xattr(&init_user_ns, acl, in ceph_pre_init_acls()
235 info->acl = acl; in ceph_pre_init_acls()
241 posix_acl_release(acl); in ceph_pre_init_acls()
253 ceph_set_cached_acl(inode, ACL_TYPE_ACCESS, info->acl); in ceph_init_inode_acls()
259 posix_acl_release(info->acl); in ceph_release_acls_info()