]> git.ipfire.org Git - people/ms/linux.git/blame - fs/hfsplus/xattr_trusted.c
Merge tag 'soc-fixes-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[people/ms/linux.git] / fs / hfsplus / xattr_trusted.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
127e5f5a
VD
2/*
3 * linux/fs/hfsplus/xattr_trusted.c
4 *
5 * Vyacheslav Dubeyko <slava@dubeyko.com>
6 *
7 * Handler for trusted extended attributes.
8 */
9
bf29e886
HTL
10#include <linux/nls.h>
11
127e5f5a
VD
12#include "hfsplus_fs.h"
13#include "xattr.h"
14
d9a82a04 15static int hfsplus_trusted_getxattr(const struct xattr_handler *handler,
b296821a
AV
16 struct dentry *unused, struct inode *inode,
17 const char *name, void *buffer, size_t size)
127e5f5a 18{
b296821a 19 return hfsplus_getxattr(inode, name, buffer, size,
a3cef4cd
FF
20 XATTR_TRUSTED_PREFIX,
21 XATTR_TRUSTED_PREFIX_LEN);
127e5f5a
VD
22}
23
d9a82a04 24static int hfsplus_trusted_setxattr(const struct xattr_handler *handler,
e65ce2a5 25 struct user_namespace *mnt_userns,
59301226
AV
26 struct dentry *unused, struct inode *inode,
27 const char *name, const void *buffer,
28 size_t size, int flags)
127e5f5a 29{
59301226 30 return hfsplus_setxattr(inode, name, buffer, size, flags,
5e61473e 31 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN);
127e5f5a
VD
32}
33
127e5f5a
VD
34const struct xattr_handler hfsplus_xattr_trusted_handler = {
35 .prefix = XATTR_TRUSTED_PREFIX,
127e5f5a
VD
36 .get = hfsplus_trusted_getxattr,
37 .set = hfsplus_trusted_setxattr,
38};