]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - fs/hfsplus/xattr_user.c
jffs2: Add missing capability check for listing trusted xattrs
[mirror_ubuntu-artful-kernel.git] / fs / hfsplus / xattr_user.c
CommitLineData
127e5f5a
VD
1/*
2 * linux/fs/hfsplus/xattr_user.c
3 *
4 * Vyacheslav Dubeyko <slava@dubeyko.com>
5 *
6 * Handler for user extended attributes.
7 */
8
bf29e886
HTL
9#include <linux/nls.h>
10
127e5f5a
VD
11#include "hfsplus_fs.h"
12#include "xattr.h"
13
14static int hfsplus_user_getxattr(struct dentry *dentry, const char *name,
15 void *buffer, size_t size, int type)
16{
127e5f5a 17
a3cef4cd
FF
18 return hfsplus_getxattr(dentry, name, buffer, size,
19 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);
127e5f5a
VD
20}
21
22static int hfsplus_user_setxattr(struct dentry *dentry, const char *name,
23 const void *buffer, size_t size, int flags, int type)
24{
5e61473e
FF
25 return hfsplus_setxattr(dentry, name, buffer, size, flags,
26 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);
127e5f5a
VD
27}
28
127e5f5a
VD
29const struct xattr_handler hfsplus_xattr_user_handler = {
30 .prefix = XATTR_USER_PREFIX,
127e5f5a
VD
31 .get = hfsplus_user_getxattr,
32 .set = hfsplus_user_setxattr,
33};