diff options
Diffstat (limited to 'fs/ext3/acl.c')
-rw-r--r-- | fs/ext3/acl.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c index e0c74545171..a9707689d9e 100644 --- a/fs/ext3/acl.c +++ b/fs/ext3/acl.c | |||
@@ -134,7 +134,7 @@ ext3_iget_acl(struct inode *inode, struct posix_acl **i_acl) | |||
134 | if (acl) { | 134 | if (acl) { |
135 | spin_lock(&inode->i_lock); | 135 | spin_lock(&inode->i_lock); |
136 | acl = *i_acl; | 136 | acl = *i_acl; |
137 | if (acl != EXT3_ACL_NOT_CACHED) | 137 | if (acl != ACL_NOT_CACHED) |
138 | acl = posix_acl_dup(acl); | 138 | acl = posix_acl_dup(acl); |
139 | spin_unlock(&inode->i_lock); | 139 | spin_unlock(&inode->i_lock); |
140 | } | 140 | } |
@@ -147,7 +147,7 @@ ext3_iset_acl(struct inode *inode, struct posix_acl **i_acl, | |||
147 | struct posix_acl *acl) | 147 | struct posix_acl *acl) |
148 | { | 148 | { |
149 | spin_lock(&inode->i_lock); | 149 | spin_lock(&inode->i_lock); |
150 | if (*i_acl != EXT3_ACL_NOT_CACHED) | 150 | if (*i_acl != ACL_NOT_CACHED) |
151 | posix_acl_release(*i_acl); | 151 | posix_acl_release(*i_acl); |
152 | *i_acl = posix_acl_dup(acl); | 152 | *i_acl = posix_acl_dup(acl); |
153 | spin_unlock(&inode->i_lock); | 153 | spin_unlock(&inode->i_lock); |
@@ -161,7 +161,6 @@ ext3_iset_acl(struct inode *inode, struct posix_acl **i_acl, | |||
161 | static struct posix_acl * | 161 | static struct posix_acl * |
162 | ext3_get_acl(struct inode *inode, int type) | 162 | ext3_get_acl(struct inode *inode, int type) |
163 | { | 163 | { |
164 | struct ext3_inode_info *ei = EXT3_I(inode); | ||
165 | int name_index; | 164 | int name_index; |
166 | char *value = NULL; | 165 | char *value = NULL; |
167 | struct posix_acl *acl; | 166 | struct posix_acl *acl; |
@@ -172,15 +171,15 @@ ext3_get_acl(struct inode *inode, int type) | |||
172 | 171 | ||
173 | switch(type) { | 172 | switch(type) { |
174 | case ACL_TYPE_ACCESS: | 173 | case ACL_TYPE_ACCESS: |
175 | acl = ext3_iget_acl(inode, &ei->i_acl); | 174 | acl = ext3_iget_acl(inode, &inode->i_acl); |
176 | if (acl != EXT3_ACL_NOT_CACHED) | 175 | if (acl != ACL_NOT_CACHED) |
177 | return acl; | 176 | return acl; |
178 | name_index = EXT3_XATTR_INDEX_POSIX_ACL_ACCESS; | 177 | name_index = EXT3_XATTR_INDEX_POSIX_ACL_ACCESS; |
179 | break; | 178 | break; |
180 | 179 | ||
181 | case ACL_TYPE_DEFAULT: | 180 | case ACL_TYPE_DEFAULT: |
182 | acl = ext3_iget_acl(inode, &ei->i_default_acl); | 181 | acl = ext3_iget_acl(inode, &inode->i_default_acl); |
183 | if (acl != EXT3_ACL_NOT_CACHED) | 182 | if (acl != ACL_NOT_CACHED) |
184 | return acl; | 183 | return acl; |
185 | name_index = EXT3_XATTR_INDEX_POSIX_ACL_DEFAULT; | 184 | name_index = EXT3_XATTR_INDEX_POSIX_ACL_DEFAULT; |
186 | break; | 185 | break; |
@@ -206,11 +205,11 @@ ext3_get_acl(struct inode *inode, int type) | |||
206 | if (!IS_ERR(acl)) { | 205 | if (!IS_ERR(acl)) { |
207 | switch(type) { | 206 | switch(type) { |
208 | case ACL_TYPE_ACCESS: | 207 | case ACL_TYPE_ACCESS: |
209 | ext3_iset_acl(inode, &ei->i_acl, acl); | 208 | ext3_iset_acl(inode, &inode->i_acl, acl); |
210 | break; | 209 | break; |
211 | 210 | ||
212 | case ACL_TYPE_DEFAULT: | 211 | case ACL_TYPE_DEFAULT: |
213 | ext3_iset_acl(inode, &ei->i_default_acl, acl); | 212 | ext3_iset_acl(inode, &inode->i_default_acl, acl); |
214 | break; | 213 | break; |
215 | } | 214 | } |
216 | } | 215 | } |
@@ -226,7 +225,6 @@ static int | |||
226 | ext3_set_acl(handle_t *handle, struct inode *inode, int type, | 225 | ext3_set_acl(handle_t *handle, struct inode *inode, int type, |
227 | struct posix_acl *acl) | 226 | struct posix_acl *acl) |
228 | { | 227 | { |
229 | struct ext3_inode_info *ei = EXT3_I(inode); | ||
230 | int name_index; | 228 | int name_index; |
231 | void *value = NULL; | 229 | void *value = NULL; |
232 | size_t size = 0; | 230 | size_t size = 0; |
@@ -274,11 +272,11 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type, | |||
274 | if (!error) { | 272 | if (!error) { |
275 | switch(type) { | 273 | switch(type) { |
276 | case ACL_TYPE_ACCESS: | 274 | case ACL_TYPE_ACCESS: |
277 | ext3_iset_acl(inode, &ei->i_acl, acl); | 275 | ext3_iset_acl(inode, &inode->i_acl, acl); |
278 | break; | 276 | break; |
279 | 277 | ||
280 | case ACL_TYPE_DEFAULT: | 278 | case ACL_TYPE_DEFAULT: |
281 | ext3_iset_acl(inode, &ei->i_default_acl, acl); | 279 | ext3_iset_acl(inode, &inode->i_default_acl, acl); |
282 | break; | 280 | break; |
283 | } | 281 | } |
284 | } | 282 | } |