• Home
  • Raw
  • Download

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(acl == ACL_NOT_CACHED); 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()
220 struct posix_acl *acl; in v9fs_xattr_get_acl() local
233 acl = v9fs_get_cached_acl(d_inode(dentry), 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()
249 struct posix_acl *acl; in v9fs_xattr_set_acl() local
271 acl = posix_acl_from_xattr(&init_user_ns, value, size); in v9fs_xattr_set_acl()
272 if (IS_ERR(acl)) in v9fs_xattr_set_acl()
273 return PTR_ERR(acl); in v9fs_xattr_set_acl()
274 else if (acl) { in v9fs_xattr_set_acl()
275 retval = posix_acl_valid(acl); in v9fs_xattr_set_acl()
280 acl = NULL; in v9fs_xattr_set_acl()
284 if (acl) { in v9fs_xattr_set_acl()
286 struct posix_acl *old_acl = acl; in v9fs_xattr_set_acl()
288 retval = posix_acl_update_mode(inode, &iattr.ia_mode, &acl); in v9fs_xattr_set_acl()
291 if (!acl) { in v9fs_xattr_set_acl()
311 retval = acl ? -EINVAL : 0; in v9fs_xattr_set_acl()
320 set_cached_acl(inode, handler->flags, acl); in v9fs_xattr_set_acl()
322 posix_acl_release(acl); in v9fs_xattr_set_acl()