Lines Matching refs:acl

16 	struct posix_acl *acl;  in nfs3_listxattr()  local
27 acl = nfs3_proc_getacl(inode, ACL_TYPE_ACCESS); in nfs3_listxattr()
28 if (IS_ERR(acl)) in nfs3_listxattr()
29 return PTR_ERR(acl); in nfs3_listxattr()
30 if (acl) { in nfs3_listxattr()
32 posix_acl_release(acl); in nfs3_listxattr()
36 acl = nfs3_proc_getacl(inode, ACL_TYPE_DEFAULT); in nfs3_listxattr()
37 if (IS_ERR(acl)) in nfs3_listxattr()
38 return PTR_ERR(acl); in nfs3_listxattr()
39 if (acl) { in nfs3_listxattr()
41 posix_acl_release(acl); in nfs3_listxattr()
56 struct posix_acl *acl; in nfs3_getxattr() local
66 acl = nfs3_proc_getacl(inode, type); in nfs3_getxattr()
67 if (IS_ERR(acl)) in nfs3_getxattr()
68 return PTR_ERR(acl); in nfs3_getxattr()
69 else if (acl) { in nfs3_getxattr()
70 if (type == ACL_TYPE_ACCESS && acl->a_count == 0) in nfs3_getxattr()
73 error = posix_acl_to_xattr(acl, buffer, size); in nfs3_getxattr()
74 posix_acl_release(acl); in nfs3_getxattr()
85 struct posix_acl *acl; in nfs3_setxattr() local
95 acl = posix_acl_from_xattr(value, size); in nfs3_setxattr()
96 if (IS_ERR(acl)) in nfs3_setxattr()
97 return PTR_ERR(acl); in nfs3_setxattr()
98 error = nfs3_proc_setacl(inode, type, acl); in nfs3_setxattr()
99 posix_acl_release(acl); in nfs3_setxattr()
143 struct posix_acl *acl = ERR_PTR(-EINVAL); in nfs3_get_cached_acl() local
148 acl = nfsi->acl_access; in nfs3_get_cached_acl()
152 acl = nfsi->acl_default; in nfs3_get_cached_acl()
158 if (IS_ERR(acl)) in nfs3_get_cached_acl()
159 acl = ERR_PTR(-EAGAIN); in nfs3_get_cached_acl()
161 acl = posix_acl_dup(acl); in nfs3_get_cached_acl()
165 inode->i_ino, type, acl); in nfs3_get_cached_acl()
166 return acl; in nfs3_get_cached_acl()
169 static void nfs3_cache_acls(struct inode *inode, struct posix_acl *acl, in nfs3_cache_acls() argument
175 inode->i_ino, acl, dfacl); in nfs3_cache_acls()
178 if (!IS_ERR(acl)) in nfs3_cache_acls()
179 nfsi->acl_access = posix_acl_dup(acl); in nfs3_cache_acls()
201 struct posix_acl *acl; in nfs3_proc_getacl() local
210 acl = nfs3_get_cached_acl(inode, type); in nfs3_proc_getacl()
211 if (acl != ERR_PTR(-EAGAIN)) in nfs3_proc_getacl()
212 return acl; in nfs3_proc_getacl()
213 acl = NULL; in nfs3_proc_getacl()
271 acl = res.acl_access; in nfs3_proc_getacl()
276 acl = res.acl_default; in nfs3_proc_getacl()
286 posix_acl_release(acl); in nfs3_proc_getacl()
287 acl = ERR_PTR(status); in nfs3_proc_getacl()
289 return acl; in nfs3_proc_getacl()
292 static int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, in nfs3_proc_setacls() argument
301 .acl_access = acl, in nfs3_proc_setacls()
317 if (acl != NULL && acl->a_count > NFS_ACL_MAX_ENTRIES) in nfs3_proc_setacls()
324 args.len = nfsacl_size(acl, dfacl); in nfs3_proc_setacls()
326 args.len = nfsacl_size(acl, NULL); in nfs3_proc_setacls()
356 nfs3_cache_acls(inode, acl, dfacl); in nfs3_proc_setacls()
376 int nfs3_proc_setacl(struct inode *inode, int type, struct posix_acl *acl) in nfs3_proc_setacl() argument
391 dfacl = acl; in nfs3_proc_setacl()
392 alloc = acl = nfs3_proc_getacl(inode, in nfs3_proc_setacl()
404 if (acl == NULL) { in nfs3_proc_setacl()
405 alloc = acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); in nfs3_proc_setacl()
409 status = nfs3_proc_setacls(inode, acl, dfacl); in nfs3_proc_setacl()
420 struct posix_acl *dfacl, *acl; in nfs3_proc_set_default_acl() local
430 acl = posix_acl_dup(dfacl); in nfs3_proc_set_default_acl()
431 error = posix_acl_create(&acl, GFP_KERNEL, &mode); in nfs3_proc_set_default_acl()
434 error = nfs3_proc_setacls(inode, acl, S_ISDIR(inode->i_mode) ? in nfs3_proc_set_default_acl()
436 posix_acl_release(acl); in nfs3_proc_set_default_acl()