]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - fs/hfsplus/xattr_user.c
tuntap: disable preemption during XDP processing
[mirror_ubuntu-bionic-kernel.git] / fs / hfsplus / xattr_user.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
127e5f5a
VD
2/*
3 * linux/fs/hfsplus/xattr_user.c
4 *
5 * Vyacheslav Dubeyko <slava@dubeyko.com>
6 *
7 * Handler for user 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_user_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{
127e5f5a 19
b296821a 20 return hfsplus_getxattr(inode, name, buffer, size,
a3cef4cd 21 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);
127e5f5a
VD
22}
23
d9a82a04 24static int hfsplus_user_setxattr(const struct xattr_handler *handler,
59301226
AV
25 struct dentry *unused, struct inode *inode,
26 const char *name, const void *buffer,
27 size_t size, int flags)
127e5f5a 28{
59301226 29 return hfsplus_setxattr(inode, name, buffer, size, flags,
5e61473e 30 XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);
127e5f5a
VD
31}
32
127e5f5a
VD
33const struct xattr_handler hfsplus_xattr_user_handler = {
34 .prefix = XATTR_USER_PREFIX,
127e5f5a
VD
35 .get = hfsplus_user_getxattr,
36 .set = hfsplus_user_setxattr,
37};