aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/posix_acl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/posix_acl.h')
-rw-r--r--include/linux/posix_acl.h43
1 files changed, 39 insertions, 4 deletions
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h
index 833099bf8090..3e96a6a76103 100644
--- a/include/linux/posix_acl.h
+++ b/include/linux/posix_acl.h
@@ -85,12 +85,20 @@ extern int posix_acl_valid(const struct posix_acl *);
85extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); 85extern int posix_acl_permission(struct inode *, const struct posix_acl *, int);
86extern struct posix_acl *posix_acl_from_mode(umode_t, gfp_t); 86extern struct posix_acl *posix_acl_from_mode(umode_t, gfp_t);
87extern int posix_acl_equiv_mode(const struct posix_acl *, umode_t *); 87extern int posix_acl_equiv_mode(const struct posix_acl *, umode_t *);
88extern int posix_acl_create(struct posix_acl **, gfp_t, umode_t *); 88extern int __posix_acl_create(struct posix_acl **, gfp_t, umode_t *);
89extern int posix_acl_chmod(struct posix_acl **, gfp_t, umode_t); 89extern int __posix_acl_chmod(struct posix_acl **, gfp_t, umode_t);
90 90
91extern struct posix_acl *get_posix_acl(struct inode *, int); 91extern struct posix_acl *get_posix_acl(struct inode *, int);
92extern int set_posix_acl(struct inode *, int, struct posix_acl *); 92extern int set_posix_acl(struct inode *, int, struct posix_acl *);
93 93
94#ifdef CONFIG_FS_POSIX_ACL
95extern int posix_acl_chmod(struct inode *, umode_t);
96extern int posix_acl_create(struct inode *, umode_t *, struct posix_acl **,
97 struct posix_acl **);
98
99extern int simple_set_acl(struct inode *, struct posix_acl *, int);
100extern int simple_acl_create(struct inode *, struct inode *);
101
94struct posix_acl **acl_by_type(struct inode *inode, int type); 102struct posix_acl **acl_by_type(struct inode *inode, int type);
95struct posix_acl *get_cached_acl(struct inode *inode, int type); 103struct posix_acl *get_cached_acl(struct inode *inode, int type);
96struct posix_acl *get_cached_acl_rcu(struct inode *inode, int type); 104struct posix_acl *get_cached_acl_rcu(struct inode *inode, int type);
@@ -100,10 +108,37 @@ void forget_all_cached_acls(struct inode *inode);
100 108
101static inline void cache_no_acl(struct inode *inode) 109static inline void cache_no_acl(struct inode *inode)
102{ 110{
103#ifdef CONFIG_FS_POSIX_ACL
104 inode->i_acl = NULL; 111 inode->i_acl = NULL;
105 inode->i_default_acl = NULL; 112 inode->i_default_acl = NULL;
106#endif
107} 113}
114#else
115static inline int posix_acl_chmod(struct inode *inode, umode_t mode)
116{
117 return 0;
118}
119
120#define simple_set_acl NULL
121
122static inline int simple_acl_create(struct inode *dir, struct inode *inode)
123{
124 return 0;
125}
126static inline void cache_no_acl(struct inode *inode)
127{
128}
129
130static inline int posix_acl_create(struct inode *inode, umode_t *mode,
131 struct posix_acl **default_acl, struct posix_acl **acl)
132{
133 *default_acl = *acl = NULL;
134 return 0;
135}
136
137static inline void forget_all_cached_acls(struct inode *inode)
138{
139}
140#endif /* CONFIG_FS_POSIX_ACL */
141
142struct posix_acl *get_acl(struct inode *inode, int type);
108 143
109#endif /* __LINUX_POSIX_ACL_H */ 144#endif /* __LINUX_POSIX_ACL_H */