Lines Matching refs:acl
32 struct posix_acl *acl = NULL; in __v9fs_get_acl() local
41 acl = posix_acl_from_xattr(&init_user_ns, value, size); in __v9fs_get_acl()
42 if (IS_ERR(acl)) in __v9fs_get_acl()
47 acl = NULL; in __v9fs_get_acl()
49 acl = ERR_PTR(-EIO); in __v9fs_get_acl()
53 return acl; in __v9fs_get_acl()
90 struct posix_acl *acl; in v9fs_get_cached_acl() local
95 acl = get_cached_acl(inode, type); in v9fs_get_cached_acl()
96 BUG_ON(is_uncached_acl(acl)); in v9fs_get_cached_acl()
97 return acl; in v9fs_get_cached_acl()
117 static int v9fs_set_acl(struct p9_fid *fid, int type, struct posix_acl *acl) in v9fs_set_acl() argument
123 if (!acl) in v9fs_set_acl()
127 size = posix_acl_xattr_size(acl->a_count); in v9fs_set_acl()
131 retval = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); in v9fs_set_acl()
153 struct posix_acl *acl; in v9fs_acl_chmod() local
157 acl = v9fs_get_cached_acl(inode, ACL_TYPE_ACCESS); in v9fs_acl_chmod()
158 if (acl) { in v9fs_acl_chmod()
159 retval = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); in v9fs_acl_chmod()
162 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in v9fs_acl_chmod()
163 retval = v9fs_set_acl(fid, ACL_TYPE_ACCESS, acl); in v9fs_acl_chmod()
164 posix_acl_release(acl); in v9fs_acl_chmod()
170 struct posix_acl *dacl, struct posix_acl *acl) in v9fs_set_create_acl() argument
173 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in v9fs_set_create_acl()
175 v9fs_set_acl(fid, ACL_TYPE_ACCESS, acl); in v9fs_set_create_acl()
180 struct posix_acl *acl) in v9fs_put_acl() argument
183 posix_acl_release(acl); in v9fs_put_acl()
191 struct posix_acl *acl = NULL; in v9fs_acl_mode() local
194 acl = v9fs_get_cached_acl(dir, ACL_TYPE_DEFAULT); in v9fs_acl_mode()
195 if (IS_ERR(acl)) in v9fs_acl_mode()
196 return PTR_ERR(acl); in v9fs_acl_mode()
197 if (!acl) in v9fs_acl_mode()
200 if (acl) { in v9fs_acl_mode()
202 *dpacl = posix_acl_dup(acl); in v9fs_acl_mode()
203 retval = __posix_acl_create(&acl, GFP_NOFS, &mode); in v9fs_acl_mode()
207 *pacl = acl; in v9fs_acl_mode()
209 posix_acl_release(acl); in v9fs_acl_mode()
221 struct posix_acl *acl; in v9fs_xattr_get_acl() local
231 acl = v9fs_get_cached_acl(inode, handler->flags); in v9fs_xattr_get_acl()
232 if (IS_ERR(acl)) in v9fs_xattr_get_acl()
233 return PTR_ERR(acl); in v9fs_xattr_get_acl()
234 if (acl == NULL) in v9fs_xattr_get_acl()
236 error = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); in v9fs_xattr_get_acl()
237 posix_acl_release(acl); in v9fs_xattr_get_acl()
248 struct posix_acl *acl; in v9fs_xattr_set_acl() local
266 acl = posix_acl_from_xattr(&init_user_ns, value, size); in v9fs_xattr_set_acl()
267 if (IS_ERR(acl)) in v9fs_xattr_set_acl()
268 return PTR_ERR(acl); in v9fs_xattr_set_acl()
269 else if (acl) { in v9fs_xattr_set_acl()
270 retval = posix_acl_valid(inode->i_sb->s_user_ns, acl); in v9fs_xattr_set_acl()
275 acl = NULL; in v9fs_xattr_set_acl()
279 if (acl) { in v9fs_xattr_set_acl()
281 struct posix_acl *old_acl = acl; in v9fs_xattr_set_acl()
283 retval = posix_acl_update_mode(inode, &iattr.ia_mode, &acl); in v9fs_xattr_set_acl()
286 if (!acl) { in v9fs_xattr_set_acl()
306 retval = acl ? -EINVAL : 0; in v9fs_xattr_set_acl()
315 set_cached_acl(inode, handler->flags, acl); in v9fs_xattr_set_acl()
317 posix_acl_release(acl); in v9fs_xattr_set_acl()