Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * Copyright (C) 2007 Red Hat.  All rights reserved.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 4 */
 5
 6#ifndef BTRFS_XATTR_H
 7#define BTRFS_XATTR_H
 8
 9#include <linux/xattr.h>
10
11extern const struct xattr_handler * const btrfs_xattr_handlers[];
12
13int btrfs_getxattr(struct inode *inode, const char *name,
14		void *buffer, size_t size);
15int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
16		   const char *name, const void *value, size_t size, int flags);
17int btrfs_setxattr_trans(struct inode *inode, const char *name,
18			 const void *value, size_t size, int flags);
19ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
 
20
21int btrfs_xattr_security_init(struct btrfs_trans_handle *trans,
22				     struct inode *inode, struct inode *dir,
23				     const struct qstr *qstr);
24
25#endif
v4.6
 
 1/*
 2 * Copyright (C) 2007 Red Hat.  All rights reserved.
 3 *
 4 * This program is free software; you can redistribute it and/or
 5 * modify it under the terms of the GNU General Public
 6 * License v2 as published by the Free Software Foundation.
 7 *
 8 * This program is distributed in the hope that it will be useful,
 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 * General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public
14 * License along with this program; if not, write to the
15 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 * Boston, MA 021110-1307, USA.
17 */
18
19#ifndef __XATTR__
20#define __XATTR__
21
22#include <linux/xattr.h>
23
24extern const struct xattr_handler *btrfs_xattr_handlers[];
25
26extern ssize_t __btrfs_getxattr(struct inode *inode, const char *name,
27		void *buffer, size_t size);
28extern int __btrfs_setxattr(struct btrfs_trans_handle *trans,
29			    struct inode *inode, const char *name,
30			    const void *value, size_t size, int flags);
31extern int btrfs_setxattr(struct dentry *dentry, const char *name,
32		const void *value, size_t size, int flags);
33extern int btrfs_removexattr(struct dentry *dentry, const char *name);
34
35extern int btrfs_xattr_security_init(struct btrfs_trans_handle *trans,
36				     struct inode *inode, struct inode *dir,
37				     const struct qstr *qstr);
38
39#endif /* __XATTR__ */