scsi: cxgb4i: fix Tx skb leak
[linux/fpc-iii.git] / fs / reiserfs / xattr_user.c
blobdc59df43b2dbfb2dab5729a69d5ac302e0873ed3
1 #include "reiserfs.h"
2 #include <linux/errno.h>
3 #include <linux/fs.h>
4 #include <linux/pagemap.h>
5 #include <linux/xattr.h>
6 #include "xattr.h"
7 #include <linux/uaccess.h>
9 static int
10 user_get(const struct xattr_handler *handler, struct dentry *unused,
11 struct inode *inode, const char *name, void *buffer, size_t size)
13 if (!reiserfs_xattrs_user(inode->i_sb))
14 return -EOPNOTSUPP;
15 return reiserfs_xattr_get(inode, xattr_full_name(handler, name),
16 buffer, size);
19 static int
20 user_set(const struct xattr_handler *handler, struct dentry *unused,
21 struct inode *inode, const char *name, const void *buffer,
22 size_t size, int flags)
24 if (!reiserfs_xattrs_user(inode->i_sb))
25 return -EOPNOTSUPP;
26 return reiserfs_xattr_set(inode,
27 xattr_full_name(handler, name),
28 buffer, size, flags);
31 static bool user_list(struct dentry *dentry)
33 return reiserfs_xattrs_user(dentry->d_sb);
36 const struct xattr_handler reiserfs_xattr_user_handler = {
37 .prefix = XATTR_USER_PREFIX,
38 .get = user_get,
39 .set = user_set,
40 .list = user_list,