Commit 6582a0e6f6bc7bf64817b9e1a424782855292ab0
1 parent
5e78b43568
switch ext3 to inode->i_acl
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 5 changed files with 10 additions and 40 deletions Side-by-side Diff
fs/ext3/acl.c
... | ... | @@ -134,7 +134,7 @@ |
134 | 134 | if (acl) { |
135 | 135 | spin_lock(&inode->i_lock); |
136 | 136 | acl = *i_acl; |
137 | - if (acl != EXT3_ACL_NOT_CACHED) | |
137 | + if (acl != ACL_NOT_CACHED) | |
138 | 138 | acl = posix_acl_dup(acl); |
139 | 139 | spin_unlock(&inode->i_lock); |
140 | 140 | } |
... | ... | @@ -147,7 +147,7 @@ |
147 | 147 | struct posix_acl *acl) |
148 | 148 | { |
149 | 149 | spin_lock(&inode->i_lock); |
150 | - if (*i_acl != EXT3_ACL_NOT_CACHED) | |
150 | + if (*i_acl != ACL_NOT_CACHED) | |
151 | 151 | posix_acl_release(*i_acl); |
152 | 152 | *i_acl = posix_acl_dup(acl); |
153 | 153 | spin_unlock(&inode->i_lock); |
... | ... | @@ -161,7 +161,6 @@ |
161 | 161 | static struct posix_acl * |
162 | 162 | ext3_get_acl(struct inode *inode, int type) |
163 | 163 | { |
164 | - struct ext3_inode_info *ei = EXT3_I(inode); | |
165 | 164 | int name_index; |
166 | 165 | char *value = NULL; |
167 | 166 | struct posix_acl *acl; |
168 | 167 | |
... | ... | @@ -172,15 +171,15 @@ |
172 | 171 | |
173 | 172 | switch(type) { |
174 | 173 | case ACL_TYPE_ACCESS: |
175 | - acl = ext3_iget_acl(inode, &ei->i_acl); | |
176 | - if (acl != EXT3_ACL_NOT_CACHED) | |
174 | + acl = ext3_iget_acl(inode, &inode->i_acl); | |
175 | + if (acl != ACL_NOT_CACHED) | |
177 | 176 | return acl; |
178 | 177 | name_index = EXT3_XATTR_INDEX_POSIX_ACL_ACCESS; |
179 | 178 | break; |
180 | 179 | |
181 | 180 | case ACL_TYPE_DEFAULT: |
182 | - acl = ext3_iget_acl(inode, &ei->i_default_acl); | |
183 | - if (acl != EXT3_ACL_NOT_CACHED) | |
181 | + acl = ext3_iget_acl(inode, &inode->i_default_acl); | |
182 | + if (acl != ACL_NOT_CACHED) | |
184 | 183 | return acl; |
185 | 184 | name_index = EXT3_XATTR_INDEX_POSIX_ACL_DEFAULT; |
186 | 185 | break; |
187 | 186 | |
... | ... | @@ -206,11 +205,11 @@ |
206 | 205 | if (!IS_ERR(acl)) { |
207 | 206 | switch(type) { |
208 | 207 | case ACL_TYPE_ACCESS: |
209 | - ext3_iset_acl(inode, &ei->i_acl, acl); | |
208 | + ext3_iset_acl(inode, &inode->i_acl, acl); | |
210 | 209 | break; |
211 | 210 | |
212 | 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 | 213 | break; |
215 | 214 | } |
216 | 215 | } |
... | ... | @@ -226,7 +225,6 @@ |
226 | 225 | ext3_set_acl(handle_t *handle, struct inode *inode, int type, |
227 | 226 | struct posix_acl *acl) |
228 | 227 | { |
229 | - struct ext3_inode_info *ei = EXT3_I(inode); | |
230 | 228 | int name_index; |
231 | 229 | void *value = NULL; |
232 | 230 | size_t size = 0; |
233 | 231 | |
... | ... | @@ -274,11 +272,11 @@ |
274 | 272 | if (!error) { |
275 | 273 | switch(type) { |
276 | 274 | case ACL_TYPE_ACCESS: |
277 | - ext3_iset_acl(inode, &ei->i_acl, acl); | |
275 | + ext3_iset_acl(inode, &inode->i_acl, acl); | |
278 | 276 | break; |
279 | 277 | |
280 | 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 | 280 | break; |
283 | 281 | } |
284 | 282 | } |
fs/ext3/acl.h
... | ... | @@ -53,10 +53,6 @@ |
53 | 53 | |
54 | 54 | #ifdef CONFIG_EXT3_FS_POSIX_ACL |
55 | 55 | |
56 | -/* Value for inode->u.ext3_i.i_acl and inode->u.ext3_i.i_default_acl | |
57 | - if the ACL has not been cached */ | |
58 | -#define EXT3_ACL_NOT_CACHED ((void *)-1) | |
59 | - | |
60 | 56 | /* acl.c */ |
61 | 57 | extern int ext3_permission (struct inode *, int); |
62 | 58 | extern int ext3_acl_chmod (struct inode *); |
fs/ext3/inode.c
... | ... | @@ -2752,10 +2752,6 @@ |
2752 | 2752 | return inode; |
2753 | 2753 | |
2754 | 2754 | ei = EXT3_I(inode); |
2755 | -#ifdef CONFIG_EXT3_FS_POSIX_ACL | |
2756 | - ei->i_acl = EXT3_ACL_NOT_CACHED; | |
2757 | - ei->i_default_acl = EXT3_ACL_NOT_CACHED; | |
2758 | -#endif | |
2759 | 2755 | ei->i_block_alloc_info = NULL; |
2760 | 2756 | |
2761 | 2757 | ret = __ext3_get_inode_loc(inode, &iloc, 0); |
fs/ext3/super.c
... | ... | @@ -464,10 +464,6 @@ |
464 | 464 | ei = kmem_cache_alloc(ext3_inode_cachep, GFP_NOFS); |
465 | 465 | if (!ei) |
466 | 466 | return NULL; |
467 | -#ifdef CONFIG_EXT3_FS_POSIX_ACL | |
468 | - ei->i_acl = EXT3_ACL_NOT_CACHED; | |
469 | - ei->i_default_acl = EXT3_ACL_NOT_CACHED; | |
470 | -#endif | |
471 | 467 | ei->i_block_alloc_info = NULL; |
472 | 468 | ei->vfs_inode.i_version = 1; |
473 | 469 | return &ei->vfs_inode; |
... | ... | @@ -518,18 +514,6 @@ |
518 | 514 | static void ext3_clear_inode(struct inode *inode) |
519 | 515 | { |
520 | 516 | struct ext3_block_alloc_info *rsv = EXT3_I(inode)->i_block_alloc_info; |
521 | -#ifdef CONFIG_EXT3_FS_POSIX_ACL | |
522 | - if (EXT3_I(inode)->i_acl && | |
523 | - EXT3_I(inode)->i_acl != EXT3_ACL_NOT_CACHED) { | |
524 | - posix_acl_release(EXT3_I(inode)->i_acl); | |
525 | - EXT3_I(inode)->i_acl = EXT3_ACL_NOT_CACHED; | |
526 | - } | |
527 | - if (EXT3_I(inode)->i_default_acl && | |
528 | - EXT3_I(inode)->i_default_acl != EXT3_ACL_NOT_CACHED) { | |
529 | - posix_acl_release(EXT3_I(inode)->i_default_acl); | |
530 | - EXT3_I(inode)->i_default_acl = EXT3_ACL_NOT_CACHED; | |
531 | - } | |
532 | -#endif | |
533 | 517 | ext3_discard_reservation(inode); |
534 | 518 | EXT3_I(inode)->i_block_alloc_info = NULL; |
535 | 519 | if (unlikely(rsv)) |
include/linux/ext3_fs_i.h