20 #include <linux/string.h>
21 #include <linux/xattr.h>
24 #include <linux/sched.h>
25 #include <linux/slab.h>
41 acl = get_cached_acl(inode, type);
65 }
else if (size == -
ENOENT || size == -
ENODATA || size == 0) {
74 set_cached_acl(inode, type, acl);
95 posix_acl_release(acl);
137 size = posix_acl_xattr_size(acl->
a_count);
154 set_cached_acl(inode, type, acl);
159 static int btrfs_xattr_acl_set(
struct dentry *dentry,
const char *name,
160 const void *value,
size_t size,
int flags,
int type)
183 ret = btrfs_set_acl(
NULL, dentry->
d_inode, acl, type);
185 posix_acl_release(acl);
196 struct inode *inode,
struct inode *dir)
218 ret = btrfs_set_acl(trans, inode, acl,
237 posix_acl_release(acl);
254 if (IS_ERR_OR_NULL(acl))
261 posix_acl_release(acl);
268 .get = btrfs_xattr_acl_get,
269 .set = btrfs_xattr_acl_set,
275 .get = btrfs_xattr_acl_get,
276 .set = btrfs_xattr_acl_set,