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()
120 static int v9fs_set_acl(struct p9_fid *fid, int type, struct posix_acl *acl) in v9fs_set_acl() argument
126 if (!acl) in v9fs_set_acl()
130 size = posix_acl_xattr_size(acl->a_count); in v9fs_set_acl()
134 retval = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); in v9fs_set_acl()
156 struct posix_acl *acl; in v9fs_acl_chmod() local
160 acl = v9fs_get_cached_acl(inode, ACL_TYPE_ACCESS); in v9fs_acl_chmod()
161 if (acl) { in v9fs_acl_chmod()
162 retval = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); in v9fs_acl_chmod()
165 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in v9fs_acl_chmod()
166 retval = v9fs_set_acl(fid, ACL_TYPE_ACCESS, acl); in v9fs_acl_chmod()
167 posix_acl_release(acl); in v9fs_acl_chmod()
173 struct posix_acl *dacl, struct posix_acl *acl) in v9fs_set_create_acl() argument
176 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in v9fs_set_create_acl()
178 v9fs_set_acl(fid, ACL_TYPE_ACCESS, acl); in v9fs_set_create_acl()
183 struct posix_acl *acl) in v9fs_put_acl() argument
186 posix_acl_release(acl); in v9fs_put_acl()
194 struct posix_acl *acl = NULL; in v9fs_acl_mode() local
197 acl = v9fs_get_cached_acl(dir, ACL_TYPE_DEFAULT); in v9fs_acl_mode()
198 if (IS_ERR(acl)) in v9fs_acl_mode()
199 return PTR_ERR(acl); in v9fs_acl_mode()
200 if (!acl) in v9fs_acl_mode()
203 if (acl) { in v9fs_acl_mode()
205 *dpacl = posix_acl_dup(acl); in v9fs_acl_mode()
206 retval = __posix_acl_create(&acl, GFP_NOFS, &mode); in v9fs_acl_mode()
210 *pacl = acl; in v9fs_acl_mode()
212 posix_acl_release(acl); in v9fs_acl_mode()
223 struct posix_acl *acl; in v9fs_xattr_get_acl() local
233 acl = v9fs_get_cached_acl(inode, handler->flags); in v9fs_xattr_get_acl()
234 if (IS_ERR(acl)) in v9fs_xattr_get_acl()
235 return PTR_ERR(acl); in v9fs_xattr_get_acl()
236 if (acl == NULL) in v9fs_xattr_get_acl()
238 error = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); in v9fs_xattr_get_acl()
239 posix_acl_release(acl); in v9fs_xattr_get_acl()
251 struct posix_acl *acl; in v9fs_xattr_set_acl() local
269 acl = posix_acl_from_xattr(&init_user_ns, value, size); in v9fs_xattr_set_acl()
270 if (IS_ERR(acl)) in v9fs_xattr_set_acl()
271 return PTR_ERR(acl); in v9fs_xattr_set_acl()
272 else if (acl) { in v9fs_xattr_set_acl()
273 retval = posix_acl_valid(inode->i_sb->s_user_ns, acl); in v9fs_xattr_set_acl()
278 acl = NULL; in v9fs_xattr_set_acl()
282 if (acl) { in v9fs_xattr_set_acl()
284 struct posix_acl *old_acl = acl; in v9fs_xattr_set_acl()
287 &iattr.ia_mode, &acl); in v9fs_xattr_set_acl()
290 if (!acl) { in v9fs_xattr_set_acl()
310 retval = acl ? -EINVAL : 0; in v9fs_xattr_set_acl()
319 set_cached_acl(inode, handler->flags, acl); in v9fs_xattr_set_acl()
321 posix_acl_release(acl); in v9fs_xattr_set_acl()