1 #include <linux/init.h>
2 #include <linux/posix_acl.h>
4 #define REISERFS_ACL_VERSION 0x0001
15 } reiserfs_acl_entry_short;
19 } reiserfs_acl_header;
21 static inline size_t reiserfs_acl_size(int count)
24 return sizeof(reiserfs_acl_header) +
25 count * sizeof(reiserfs_acl_entry_short);
27 return sizeof(reiserfs_acl_header) +
28 4 * sizeof(reiserfs_acl_entry_short) +
29 (count - 4) * sizeof(reiserfs_acl_entry);
33 static inline int reiserfs_acl_count(size_t size)
36 size -= sizeof(reiserfs_acl_header);
37 s = size - 4 * sizeof(reiserfs_acl_entry_short);
39 if (size % sizeof(reiserfs_acl_entry_short))
41 return size / sizeof(reiserfs_acl_entry_short);
43 if (s % sizeof(reiserfs_acl_entry))
45 return s / sizeof(reiserfs_acl_entry) + 4;
49 #ifdef CONFIG_REISERFS_FS_POSIX_ACL
50 struct posix_acl *reiserfs_get_acl(struct inode *inode, int type);
51 int reiserfs_acl_chmod(struct inode *inode);
52 int reiserfs_inherit_default_acl(struct inode *dir, struct dentry *dentry,
54 int reiserfs_cache_default_acl(struct inode *dir);
55 extern int reiserfs_xattr_posix_acl_init(void) __init;
56 extern int reiserfs_xattr_posix_acl_exit(void);
57 extern struct reiserfs_xattr_handler posix_acl_default_handler;
58 extern struct reiserfs_xattr_handler posix_acl_access_handler;
60 static inline void reiserfs_init_acl_access(struct inode *inode)
62 REISERFS_I(inode)->i_acl_access = NULL;
65 static inline void reiserfs_init_acl_default(struct inode *inode)
67 REISERFS_I(inode)->i_acl_default = NULL;
71 #define reiserfs_cache_default_acl(inode) 0
73 static inline struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
78 static inline int reiserfs_xattr_posix_acl_init(void)
83 static inline int reiserfs_xattr_posix_acl_exit(void)
88 static inline int reiserfs_acl_chmod(struct inode *inode)
94 reiserfs_inherit_default_acl(const struct inode *dir, struct dentry *dentry,
100 static inline void reiserfs_init_acl_access(struct inode *inode)
104 static inline void reiserfs_init_acl_default(struct inode *inode)