From 1c7c474c31aea6d5cb2fb35f31d9e9e91ae466b1 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 3 Nov 2009 16:44:44 +0100 Subject: make generic_acl slightly more generic Now that we cache the ACL pointers in the generic inode all the generic_acl cruft can go away and generic_acl.c can directly implement xattr handlers dealing with the full Posix ACL semantics for in-memory filesystems. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro --- include/linux/generic_acl.h | 41 ++++++++++------------------------------- include/linux/shmem_fs.h | 16 ---------------- 2 files changed, 10 insertions(+), 47 deletions(-) (limited to 'include') diff --git a/include/linux/generic_acl.h b/include/linux/generic_acl.h index 886f5faa08cb..ca666d18ed67 100644 --- a/include/linux/generic_acl.h +++ b/include/linux/generic_acl.h @@ -1,36 +1,15 @@ -/* - * include/linux/generic_acl.h - * - * (C) 2005 Andreas Gruenbacher - * - * This file is released under the GPL. - */ +#ifndef LINUX_GENERIC_ACL_H +#define LINUX_GENERIC_ACL_H -#ifndef GENERIC_ACL_H -#define GENERIC_ACL_H +#include -#include -#include +struct inode; -/** - * struct generic_acl_operations - filesystem operations - * - * Filesystems must make these operations available to the generic - * operations. - */ -struct generic_acl_operations { - struct posix_acl *(*getacl)(struct inode *, int); - void (*setacl)(struct inode *, int, struct posix_acl *); -}; +extern struct xattr_handler generic_acl_access_handler; +extern struct xattr_handler generic_acl_default_handler; -size_t generic_acl_list(struct inode *, struct generic_acl_operations *, int, - char *, size_t); -int generic_acl_get(struct inode *, struct generic_acl_operations *, int, - void *, size_t); -int generic_acl_set(struct inode *, struct generic_acl_operations *, int, - const void *, size_t); -int generic_acl_init(struct inode *, struct inode *, - struct generic_acl_operations *); -int generic_acl_chmod(struct inode *, struct generic_acl_operations *); +int generic_acl_init(struct inode *, struct inode *); +int generic_acl_chmod(struct inode *); +int generic_check_acl(struct inode *inode, int mask); -#endif +#endif /* LINUX_GENERIC_ACL_H */ diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index deee7afd8d66..e164291fb3e7 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -41,20 +41,4 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode) extern int init_tmpfs(void); extern int shmem_fill_super(struct super_block *sb, void *data, int silent); -#ifdef CONFIG_TMPFS_POSIX_ACL -int shmem_check_acl(struct inode *, int); -int shmem_acl_init(struct inode *, struct inode *); - -extern struct xattr_handler shmem_xattr_acl_access_handler; -extern struct xattr_handler shmem_xattr_acl_default_handler; - -extern struct generic_acl_operations shmem_acl_ops; - -#else -static inline int shmem_acl_init(struct inode *inode, struct inode *dir) -{ - return 0; -} -#endif /* CONFIG_TMPFS_POSIX_ACL */ - #endif -- cgit v1.2.3