Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[linux-2.6-block.git] / fs / hfsplus / xattr_trusted.c
CommitLineData
127e5f5a
VD
1/*
2 * linux/fs/hfsplus/xattr_trusted.c
3 *
4 * Vyacheslav Dubeyko <slava@dubeyko.com>
5 *
6 * Handler for trusted extended attributes.
7 */
8
bf29e886
HTL
9#include <linux/nls.h>
10
127e5f5a
VD
11#include "hfsplus_fs.h"
12#include "xattr.h"
13
d9a82a04
AG
14static int hfsplus_trusted_getxattr(const struct xattr_handler *handler,
15 struct dentry *dentry, const char *name,
16 void *buffer, size_t size)
127e5f5a 17{
a3cef4cd
FF
18 return hfsplus_getxattr(dentry, name, buffer, size,
19 XATTR_TRUSTED_PREFIX,
20 XATTR_TRUSTED_PREFIX_LEN);
127e5f5a
VD
21}
22
d9a82a04
AG
23static int hfsplus_trusted_setxattr(const struct xattr_handler *handler,
24 struct dentry *dentry, const char *name,
25 const void *buffer, size_t size, int flags)
127e5f5a 26{
5e61473e
FF
27 return hfsplus_setxattr(dentry, name, buffer, size, flags,
28 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN);
127e5f5a
VD
29}
30
127e5f5a
VD
31const struct xattr_handler hfsplus_xattr_trusted_handler = {
32 .prefix = XATTR_TRUSTED_PREFIX,
127e5f5a
VD
33 .get = hfsplus_trusted_getxattr,
34 .set = hfsplus_trusted_setxattr,
35};