Lines Matching refs:acl
44 struct posix_acl *acl; in gfs2_get_acl() local
52 acl = get_cached_acl(&ip->i_inode, type); in gfs2_get_acl()
53 if (acl != ACL_NOT_CACHED) in gfs2_get_acl()
54 return acl; in gfs2_get_acl()
66 acl = posix_acl_from_xattr(data, len); in gfs2_get_acl()
68 return acl; in gfs2_get_acl()
87 static int gfs2_acl_set(struct inode *inode, int type, struct posix_acl *acl) in gfs2_acl_set() argument
95 len = posix_acl_to_xattr(acl, NULL, 0); in gfs2_acl_set()
101 error = posix_acl_to_xattr(acl, data, len); in gfs2_acl_set()
106 set_cached_acl(inode, type, acl); in gfs2_acl_set()
115 struct posix_acl *acl; in gfs2_acl_create() local
124 acl = gfs2_get_acl(&dip->i_inode, ACL_TYPE_DEFAULT); in gfs2_acl_create()
125 if (IS_ERR(acl)) in gfs2_acl_create()
126 return PTR_ERR(acl); in gfs2_acl_create()
127 if (!acl) { in gfs2_acl_create()
135 error = gfs2_acl_set(inode, ACL_TYPE_DEFAULT, acl); in gfs2_acl_create()
140 error = posix_acl_create(&acl, GFP_NOFS, &mode); in gfs2_acl_create()
147 error = gfs2_acl_set(inode, ACL_TYPE_ACCESS, acl); in gfs2_acl_create()
153 posix_acl_release(acl); in gfs2_acl_create()
160 struct posix_acl *acl; in gfs2_acl_chmod() local
165 acl = gfs2_get_acl(&ip->i_inode, ACL_TYPE_ACCESS); in gfs2_acl_chmod()
166 if (IS_ERR(acl)) in gfs2_acl_chmod()
167 return PTR_ERR(acl); in gfs2_acl_chmod()
168 if (!acl) in gfs2_acl_chmod()
171 error = posix_acl_chmod(&acl, GFP_NOFS, attr->ia_mode); in gfs2_acl_chmod()
175 len = posix_acl_to_xattr(acl, NULL, 0); in gfs2_acl_chmod()
180 posix_acl_to_xattr(acl, data, len); in gfs2_acl_chmod()
183 set_cached_acl(&ip->i_inode, ACL_TYPE_ACCESS, acl); in gfs2_acl_chmod()
186 posix_acl_release(acl); in gfs2_acl_chmod()
204 struct posix_acl *acl; in gfs2_xattr_system_get() local
215 acl = gfs2_get_acl(inode, type); in gfs2_xattr_system_get()
216 if (IS_ERR(acl)) in gfs2_xattr_system_get()
217 return PTR_ERR(acl); in gfs2_xattr_system_get()
218 if (acl == NULL) in gfs2_xattr_system_get()
221 error = posix_acl_to_xattr(acl, buffer, size); in gfs2_xattr_system_get()
222 posix_acl_release(acl); in gfs2_xattr_system_get()
233 struct posix_acl *acl = NULL; in gfs2_xattr_system_set() local
254 acl = posix_acl_from_xattr(value, size); in gfs2_xattr_system_set()
255 if (!acl) { in gfs2_xattr_system_set()
262 if (IS_ERR(acl)) { in gfs2_xattr_system_set()
263 error = PTR_ERR(acl); in gfs2_xattr_system_set()
267 error = posix_acl_valid(acl); in gfs2_xattr_system_set()
272 if (acl->a_count > GFS2_ACL_MAX_ENTRIES) in gfs2_xattr_system_set()
277 error = posix_acl_equiv_mode(acl, &mode); in gfs2_xattr_system_set()
280 posix_acl_release(acl); in gfs2_xattr_system_set()
281 acl = NULL; in gfs2_xattr_system_set()
295 if (acl) in gfs2_xattr_system_set()
296 set_cached_acl(inode, type, acl); in gfs2_xattr_system_set()
301 posix_acl_release(acl); in gfs2_xattr_system_set()