diff options
Diffstat (limited to 'include/linux/posix_acl.h')
-rw-r--r-- | include/linux/posix_acl.h | 43 |
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 *); | |||
85 | extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); | 85 | extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); |
86 | extern struct posix_acl *posix_acl_from_mode(umode_t, gfp_t); | 86 | extern struct posix_acl *posix_acl_from_mode(umode_t, gfp_t); |
87 | extern int posix_acl_equiv_mode(const struct posix_acl *, umode_t *); | 87 | extern int posix_acl_equiv_mode(const struct posix_acl *, umode_t *); |
88 | extern int posix_acl_create(struct posix_acl **, gfp_t, umode_t *); | 88 | extern int __posix_acl_create(struct posix_acl **, gfp_t, umode_t *); |
89 | extern int posix_acl_chmod(struct posix_acl **, gfp_t, umode_t); | 89 | extern int __posix_acl_chmod(struct posix_acl **, gfp_t, umode_t); |
90 | 90 | ||
91 | extern struct posix_acl *get_posix_acl(struct inode *, int); | 91 | extern struct posix_acl *get_posix_acl(struct inode *, int); |
92 | extern int set_posix_acl(struct inode *, int, struct posix_acl *); | 92 | extern int set_posix_acl(struct inode *, int, struct posix_acl *); |
93 | 93 | ||
94 | #ifdef CONFIG_FS_POSIX_ACL | ||
95 | extern int posix_acl_chmod(struct inode *, umode_t); | ||
96 | extern int posix_acl_create(struct inode *, umode_t *, struct posix_acl **, | ||
97 | struct posix_acl **); | ||
98 | |||
99 | extern int simple_set_acl(struct inode *, struct posix_acl *, int); | ||
100 | extern int simple_acl_create(struct inode *, struct inode *); | ||
101 | |||
94 | struct posix_acl **acl_by_type(struct inode *inode, int type); | 102 | struct posix_acl **acl_by_type(struct inode *inode, int type); |
95 | struct posix_acl *get_cached_acl(struct inode *inode, int type); | 103 | struct posix_acl *get_cached_acl(struct inode *inode, int type); |
96 | struct posix_acl *get_cached_acl_rcu(struct inode *inode, int type); | 104 | struct 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 | ||
101 | static inline void cache_no_acl(struct inode *inode) | 109 | static 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 | ||
115 | static inline int posix_acl_chmod(struct inode *inode, umode_t mode) | ||
116 | { | ||
117 | return 0; | ||
118 | } | ||
119 | |||
120 | #define simple_set_acl NULL | ||
121 | |||
122 | static inline int simple_acl_create(struct inode *dir, struct inode *inode) | ||
123 | { | ||
124 | return 0; | ||
125 | } | ||
126 | static inline void cache_no_acl(struct inode *inode) | ||
127 | { | ||
128 | } | ||
129 | |||
130 | static 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 | |||
137 | static inline void forget_all_cached_acls(struct inode *inode) | ||
138 | { | ||
139 | } | ||
140 | #endif /* CONFIG_FS_POSIX_ACL */ | ||
141 | |||
142 | struct posix_acl *get_acl(struct inode *inode, int type); | ||
108 | 143 | ||
109 | #endif /* __LINUX_POSIX_ACL_H */ | 144 | #endif /* __LINUX_POSIX_ACL_H */ |