1 #include <linux/reiserfs_fs.h>
2 #include <linux/errno.h>
4 #include <linux/pagemap.h>
5 #include <linux/xattr.h>
6 #include <linux/reiserfs_xattr.h>
7 #include <asm/uaccess.h>
10 user_get(struct inode
*inode
, const char *name
, void *buffer
, size_t size
)
13 if (strlen(name
) < sizeof(XATTR_USER_PREFIX
))
15 if (!reiserfs_xattrs_user(inode
->i_sb
))
17 return reiserfs_xattr_get(inode
, name
, buffer
, size
);
21 user_set(struct inode
*inode
, const char *name
, const void *buffer
,
22 size_t size
, int flags
)
24 if (strlen(name
) < sizeof(XATTR_USER_PREFIX
))
27 if (!reiserfs_xattrs_user(inode
->i_sb
))
29 return reiserfs_xattr_set(inode
, name
, buffer
, size
, flags
);
32 static size_t user_list(struct inode
*inode
, 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(inode
->i_sb
))
39 if (list
&& len
<= list_size
) {
40 memcpy(list
, name
, name_len
);
41 list
[name_len
] = '\0';
46 struct xattr_handler reiserfs_xattr_user_handler
= {
47 .prefix
= XATTR_USER_PREFIX
,