Lines Matching refs:acl

24 	struct posix_acl *acl = NULL;  in __v9fs_get_acl()  local
33 acl = posix_acl_from_xattr(&init_user_ns, value, size); in __v9fs_get_acl()
34 if (IS_ERR(acl)) in __v9fs_get_acl()
39 acl = NULL; in __v9fs_get_acl()
41 acl = ERR_PTR(-EIO); in __v9fs_get_acl()
45 return acl; in __v9fs_get_acl()
82 struct posix_acl *acl; in v9fs_get_cached_acl() local
87 acl = get_cached_acl(inode, type); in v9fs_get_cached_acl()
88 BUG_ON(is_uncached_acl(acl)); in v9fs_get_cached_acl()
89 return acl; in v9fs_get_cached_acl()
112 static int v9fs_set_acl(struct p9_fid *fid, int type, struct posix_acl *acl) in v9fs_set_acl() argument
119 if (!acl) in v9fs_set_acl()
123 size = posix_acl_xattr_size(acl->a_count); in v9fs_set_acl()
127 retval = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); in v9fs_set_acl()
149 struct posix_acl *acl; in v9fs_acl_chmod() local
153 acl = v9fs_get_cached_acl(inode, ACL_TYPE_ACCESS); in v9fs_acl_chmod()
154 if (acl) { in v9fs_acl_chmod()
155 retval = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); in v9fs_acl_chmod()
158 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in v9fs_acl_chmod()
159 retval = v9fs_set_acl(fid, ACL_TYPE_ACCESS, acl); in v9fs_acl_chmod()
160 posix_acl_release(acl); in v9fs_acl_chmod()
166 struct posix_acl *dacl, struct posix_acl *acl) in v9fs_set_create_acl() argument
169 set_cached_acl(inode, ACL_TYPE_ACCESS, acl); in v9fs_set_create_acl()
171 v9fs_set_acl(fid, ACL_TYPE_ACCESS, acl); in v9fs_set_create_acl()
176 struct posix_acl *acl) in v9fs_put_acl() argument
179 posix_acl_release(acl); in v9fs_put_acl()
187 struct posix_acl *acl = NULL; in v9fs_acl_mode() local
190 acl = v9fs_get_cached_acl(dir, ACL_TYPE_DEFAULT); in v9fs_acl_mode()
191 if (IS_ERR(acl)) in v9fs_acl_mode()
192 return PTR_ERR(acl); in v9fs_acl_mode()
193 if (!acl) in v9fs_acl_mode()
196 if (acl) { in v9fs_acl_mode()
198 *dpacl = posix_acl_dup(acl); in v9fs_acl_mode()
199 retval = __posix_acl_create(&acl, GFP_NOFS, &mode); in v9fs_acl_mode()
203 *pacl = acl; in v9fs_acl_mode()
205 posix_acl_release(acl); in v9fs_acl_mode()
216 struct posix_acl *acl; in v9fs_xattr_get_acl() local
226 acl = v9fs_get_cached_acl(inode, handler->flags); in v9fs_xattr_get_acl()
227 if (IS_ERR(acl)) in v9fs_xattr_get_acl()
228 return PTR_ERR(acl); in v9fs_xattr_get_acl()
229 if (acl == NULL) in v9fs_xattr_get_acl()
231 error = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); in v9fs_xattr_get_acl()
232 posix_acl_release(acl); in v9fs_xattr_get_acl()
244 struct posix_acl *acl; in v9fs_xattr_set_acl() local
262 acl = posix_acl_from_xattr(&init_user_ns, value, size); in v9fs_xattr_set_acl()
263 if (IS_ERR(acl)) in v9fs_xattr_set_acl()
264 return PTR_ERR(acl); in v9fs_xattr_set_acl()
265 else if (acl) { in v9fs_xattr_set_acl()
266 retval = posix_acl_valid(inode->i_sb->s_user_ns, acl); in v9fs_xattr_set_acl()
271 acl = NULL; in v9fs_xattr_set_acl()
275 if (acl) { in v9fs_xattr_set_acl()
277 struct posix_acl *old_acl = acl; in v9fs_xattr_set_acl()
280 &iattr.ia_mode, &acl); in v9fs_xattr_set_acl()
283 if (!acl) { in v9fs_xattr_set_acl()
303 retval = acl ? -EINVAL : 0; in v9fs_xattr_set_acl()
312 set_cached_acl(inode, handler->flags, acl); in v9fs_xattr_set_acl()
314 posix_acl_release(acl); in v9fs_xattr_set_acl()