fs: take the ACL checks to common code
Replace the ->check_acl method with a ->get_acl method that simply reads an ACL from disk after having a cache miss. This means we can replace the ACL checking boilerplate code with a single implementation in namei.c. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:

committed by
Al Viro

parent
edde854e8b
commit
4e34e719e4
@@ -54,13 +54,13 @@ static inline int ext2_acl_count(size_t size)
|
||||
#ifdef CONFIG_EXT2_FS_POSIX_ACL
|
||||
|
||||
/* acl.c */
|
||||
extern int ext2_check_acl (struct inode *, int);
|
||||
extern struct posix_acl *ext2_get_acl(struct inode *inode, int type);
|
||||
extern int ext2_acl_chmod (struct inode *);
|
||||
extern int ext2_init_acl (struct inode *, struct inode *);
|
||||
|
||||
#else
|
||||
#include <linux/sched.h>
|
||||
#define ext2_check_acl NULL
|
||||
#define ext2_get_acl NULL
|
||||
#define ext2_get_acl NULL
|
||||
#define ext2_set_acl NULL
|
||||
|
||||
|
Reference in New Issue
Block a user