2 #include <linux/errno.h>
4 #include <linux/pagemap.h>
5 #include <linux/xattr.h>
7 #include <linux/uaccess.h>
10 user_get(const struct xattr_handler *handler, struct dentry *dentry,
11 const char *name, void *buffer, size_t size)
13 if (!reiserfs_xattrs_user(dentry->d_sb))
15 return reiserfs_xattr_get(d_inode(dentry),
16 xattr_full_name(handler, name),
21 user_set(const struct xattr_handler *handler, struct dentry *dentry,
22 const char *name, const void *buffer, size_t size, int flags)
24 if (!reiserfs_xattrs_user(dentry->d_sb))
26 return reiserfs_xattr_set(d_inode(dentry),
27 xattr_full_name(handler, name),
31 static size_t user_list(const struct xattr_handler *handler,
32 struct dentry *dentry, char *list, size_t list_size,
33 const char *name, size_t name_len)
35 const size_t len = name_len + 1;
37 if (!reiserfs_xattrs_user(dentry->d_sb))
39 if (list && len <= list_size) {
40 memcpy(list, name, name_len);
41 list[name_len] = '\0';
46 const struct xattr_handler reiserfs_xattr_user_handler = {
47 .prefix = XATTR_USER_PREFIX,