#include "reiserfs.h"
#include <linux/capability.h>
#include <linux/dcache.h>
#include <linux/namei.h>
#include <linux/errno.h>
#include <linux/gfp.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/pagemap.h>
#include <linux/xattr.h>
#include "xattr.h"
#include "acl.h"
#include <linux/uaccess.h>
#include <net/checksum.h>
#include <linux/stat.h>
#include <linux/quotaops.h>
#include <linux/security.h>
#include <linux/posix_acl_xattr.h>
#include <linux/xattr.h>
#define PRIVROOT_NAME …
#define XAROOT_NAME …
#ifdef CONFIG_REISERFS_FS_XATTR
static int xattr_create(struct inode *dir, struct dentry *dentry, int mode)
{ … }
#endif
static int xattr_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{ … }
static int xattr_unlink(struct inode *dir, struct dentry *dentry)
{ … }
static int xattr_rmdir(struct inode *dir, struct dentry *dentry)
{ … }
#define xattr_may_create(flags) …
static struct dentry *open_xa_root(struct super_block *sb, int flags)
{ … }
static struct dentry *open_xa_dir(const struct inode *inode, int flags)
{ … }
struct reiserfs_dentry_buf { … };
static bool
fill_with_dentries(struct dir_context *ctx, const char *name, int namelen,
loff_t offset, u64 ino, unsigned int d_type)
{ … }
static void
cleanup_dentry_buf(struct reiserfs_dentry_buf *buf)
{ … }
static int reiserfs_for_each_xattr(struct inode *inode,
int (*action)(struct dentry *, void *),
void *data)
{ … }
static int delete_one_xattr(struct dentry *dentry, void *data)
{ … }
static int chown_one_xattr(struct dentry *dentry, void *data)
{ … }
int reiserfs_delete_xattrs(struct inode *inode)
{ … }
int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs)
{ … }
#ifdef CONFIG_REISERFS_FS_XATTR
static struct dentry *xattr_lookup(struct inode *inode, const char *name,
int flags)
{ … }
static inline void reiserfs_put_page(struct page *page)
{ … }
static struct page *reiserfs_get_page(struct inode *dir, size_t n)
{ … }
static inline __u32 xattr_hash(const char *msg, int len)
{ … }
int reiserfs_commit_write(struct file *f, struct page *page,
unsigned from, unsigned to);
static void update_ctime(struct inode *inode)
{ … }
static int lookup_and_delete_xattr(struct inode *inode, const char *name)
{ … }
int
reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th,
struct inode *inode, const char *name,
const void *buffer, size_t buffer_size, int flags)
{ … }
int reiserfs_xattr_set(struct inode *inode, const char *name,
const void *buffer, size_t buffer_size, int flags)
{ … }
int
reiserfs_xattr_get(struct inode *inode, const char *name, void *buffer,
size_t buffer_size)
{ … }
#define for_each_xattr_handler(handlers, handler) …
static inline bool reiserfs_posix_acl_list(const char *name,
struct dentry *dentry)
{ … }
static inline bool reiserfs_xattr_list(const struct xattr_handler * const *handlers,
const char *name, struct dentry *dentry)
{ … }
struct listxattr_buf { … };
static bool listxattr_filler(struct dir_context *ctx, const char *name,
int namelen, loff_t offset, u64 ino,
unsigned int d_type)
{ … }
ssize_t reiserfs_listxattr(struct dentry * dentry, char *buffer, size_t size)
{ … }
static int create_privroot(struct dentry *dentry)
{ … }
#else
int __init reiserfs_xattr_register_handlers(void) { return 0; }
void reiserfs_xattr_unregister_handlers(void) {}
static int create_privroot(struct dentry *dentry) { return 0; }
#endif
const struct xattr_handler * const reiserfs_xattr_handlers[] = …;
static int xattr_mount_check(struct super_block *s)
{ … }
int reiserfs_permission(struct mnt_idmap *idmap, struct inode *inode,
int mask)
{ … }
static int xattr_hide_revalidate(struct dentry *dentry, unsigned int flags)
{ … }
static const struct dentry_operations xattr_lookup_poison_ops = …;
int reiserfs_lookup_privroot(struct super_block *s)
{ … }
int reiserfs_xattr_init(struct super_block *s, int mount_flags)
{ … }