linux/fs/btrfs/xattr.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2007 Red Hat.  All rights reserved.
 */

#include <linux/init.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/rwsem.h>
#include <linux/xattr.h>
#include <linux/security.h>
#include <linux/posix_acl_xattr.h>
#include <linux/iversion.h>
#include <linux/sched/mm.h>
#include "ctree.h"
#include "fs.h"
#include "messages.h"
#include "btrfs_inode.h"
#include "transaction.h"
#include "xattr.h"
#include "disk-io.h"
#include "props.h"
#include "locking.h"
#include "accessors.h"
#include "dir-item.h"

int btrfs_getxattr(const struct inode *inode, const char *name,
				void *buffer, size_t size)
{}

int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
		   const char *name, const void *value, size_t size, int flags)
{}

/*
 * @value: "" makes the attribute to empty, NULL removes it
 */
int btrfs_setxattr_trans(struct inode *inode, const char *name,
			 const void *value, size_t size, int flags)
{}

ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size)
{}

static int btrfs_xattr_handler_get(const struct xattr_handler *handler,
				   struct dentry *unused, struct inode *inode,
				   const char *name, void *buffer, size_t size)
{}

static int btrfs_xattr_handler_set(const struct xattr_handler *handler,
				   struct mnt_idmap *idmap,
				   struct dentry *unused, struct inode *inode,
				   const char *name, const void *buffer,
				   size_t size, int flags)
{}

static int btrfs_xattr_handler_get_security(const struct xattr_handler *handler,
					    struct dentry *unused,
					    struct inode *inode,
					    const char *name, void *buffer,
					    size_t size)
{}

static int btrfs_xattr_handler_set_security(const struct xattr_handler *handler,
					    struct mnt_idmap *idmap,
					    struct dentry *unused,
					    struct inode *inode,
					    const char *name,
					    const void *buffer,
					    size_t size, int flags)
{}

static int btrfs_xattr_handler_set_prop(const struct xattr_handler *handler,
					struct mnt_idmap *idmap,
					struct dentry *unused, struct inode *inode,
					const char *name, const void *value,
					size_t size, int flags)
{}

static const struct xattr_handler btrfs_security_xattr_handler =;

static const struct xattr_handler btrfs_trusted_xattr_handler =;

static const struct xattr_handler btrfs_user_xattr_handler =;

static const struct xattr_handler btrfs_btrfs_xattr_handler =;

const struct xattr_handler * const btrfs_xattr_handlers[] =;

static int btrfs_initxattrs(struct inode *inode,
			    const struct xattr *xattr_array, void *fs_private)
{}

int btrfs_xattr_security_init(struct btrfs_trans_handle *trans,
			      struct inode *inode, struct inode *dir,
			      const struct qstr *qstr)
{}