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>
9 #ifdef CONFIG_REISERFS_FS_POSIX_ACL
10 # include <linux/reiserfs_acl.h>
13 #define XATTR_USER_PREFIX "user."
16 user_get(struct inode
*inode
, const char *name
, void *buffer
, size_t size
)
19 if (strlen(name
) < sizeof(XATTR_USER_PREFIX
))
21 if (!reiserfs_xattrs_user(inode
->i_sb
))
23 return reiserfs_xattr_get(inode
, name
, buffer
, size
);
27 user_set(struct inode
*inode
, const char *name
, const void *buffer
,
28 size_t size
, int flags
)
31 if (strlen(name
) < sizeof(XATTR_USER_PREFIX
))
34 if (!reiserfs_xattrs_user(inode
->i_sb
))
36 return reiserfs_xattr_set(inode
, name
, buffer
, size
, flags
);
39 static int user_del(struct inode
*inode
, const char *name
)
41 if (strlen(name
) < sizeof(XATTR_USER_PREFIX
))
44 if (!reiserfs_xattrs_user(inode
->i_sb
))
50 user_list(struct inode
*inode
, const char *name
, int namelen
, char *out
)
53 if (!reiserfs_xattrs_user(inode
->i_sb
))
57 memcpy(out
, name
, len
);
62 struct reiserfs_xattr_handler user_handler
= {
63 .prefix
= XATTR_USER_PREFIX
,