ARM: dts: imx: Remove optional 'fsl,sec-era' property
[linux/fpc-iii.git] / fs / reiserfs / xattr_user.c
bloba573ca45bacc7ff3443e67ad83efe6a7ce77df05
1 // SPDX-License-Identifier: GPL-2.0
2 #include "reiserfs.h"
3 #include <linux/errno.h>
4 #include <linux/fs.h>
5 #include <linux/pagemap.h>
6 #include <linux/xattr.h>
7 #include "xattr.h"
8 #include <linux/uaccess.h>
10 static int
11 user_get(const struct xattr_handler *handler, struct dentry *unused,
12 struct inode *inode, const char *name, void *buffer, size_t size)
14 if (!reiserfs_xattrs_user(inode->i_sb))
15 return -EOPNOTSUPP;
16 return reiserfs_xattr_get(inode, xattr_full_name(handler, name),
17 buffer, size);
20 static int
21 user_set(const struct xattr_handler *handler, struct dentry *unused,
22 struct inode *inode, const char *name, const void *buffer,
23 size_t size, int flags)
25 if (!reiserfs_xattrs_user(inode->i_sb))
26 return -EOPNOTSUPP;
27 return reiserfs_xattr_set(inode,
28 xattr_full_name(handler, name),
29 buffer, size, flags);
32 static bool user_list(struct dentry *dentry)
34 return reiserfs_xattrs_user(dentry->d_sb);
37 const struct xattr_handler reiserfs_xattr_user_handler = {
38 .prefix = XATTR_USER_PREFIX,
39 .get = user_get,
40 .set = user_set,
41 .list = user_list,