15 #include <linux/module.h>
19 #include <linux/slab.h>
20 #include <linux/sched.h>
44 }
else if (size == -
ENODATA || size == 0 ||
61 v9ses = v9fs_inode2v9ses(inode);
72 if (!IS_ERR(dacl) && !IS_ERR(pacl)) {
79 posix_acl_release(dacl);
82 posix_acl_release(pacl);
94 acl = get_cached_acl(inode, type);
103 v9ses = v9fs_inode2v9ses(inode);
112 return v9fs_get_cached_acl(inode, type);
124 set_cached_acl(inode, type, acl);
130 size = posix_acl_xattr_size(acl->
a_count);
157 struct inode *inode = dentry->
d_inode;
167 posix_acl_release(acl);
179 posix_acl_release(*dpacl);
180 posix_acl_release(*pacl);
181 *dpacl = *pacl =
NULL;
201 *dpacl = posix_acl_dup(acl);
208 posix_acl_release(acl);
214 static int v9fs_remote_get_acl(
struct dentry *dentry,
const char *name,
215 void *buffer,
size_t size,
int type)
232 static int v9fs_xattr_get_acl(
struct dentry *dentry,
const char *name,
233 void *buffer,
size_t size,
int type)
239 if (
strcmp(name,
"") != 0)
242 v9ses = v9fs_dentry2v9ses(dentry);
247 return v9fs_remote_get_acl(dentry, name, buffer, size, type);
249 acl = v9fs_get_cached_acl(dentry->
d_inode, type);
255 posix_acl_release(acl);
260 static int v9fs_remote_set_acl(
struct dentry *dentry,
const char *name,
261 const void *value,
size_t size,
280 static int v9fs_xattr_set_acl(
struct dentry *dentry,
const char *name,
281 const void *value,
size_t size,
287 struct inode *inode = dentry->
d_inode;
289 if (
strcmp(name,
"") != 0)
292 v9ses = v9fs_dentry2v9ses(dentry);
298 return v9fs_remote_set_acl(dentry, name,
299 value, size, flags, type);
353 retval = acl ? -
EINVAL : 0;
362 set_cached_acl(inode, type, acl);
364 posix_acl_release(acl);
371 .get = v9fs_xattr_get_acl,
372 .set = v9fs_xattr_set_acl,
378 .get = v9fs_xattr_get_acl,
379 .set = v9fs_xattr_set_acl,