diff options
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/acl.c | 11 | ||||
-rw-r--r-- | fs/ext3/acl.h | 2 | ||||
-rw-r--r-- | fs/ext3/super.c | 9 |
3 files changed, 18 insertions, 4 deletions
diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c index 8a11fe212183..e4fa49e6c539 100644 --- a/fs/ext3/acl.c +++ b/fs/ext3/acl.c | |||
@@ -240,10 +240,17 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type, | |||
240 | } | 240 | } |
241 | 241 | ||
242 | int | 242 | int |
243 | ext3_check_acl(struct inode *inode, int mask) | 243 | ext3_check_acl(struct inode *inode, int mask, unsigned int flags) |
244 | { | 244 | { |
245 | struct posix_acl *acl = ext3_get_acl(inode, ACL_TYPE_ACCESS); | 245 | struct posix_acl *acl; |
246 | |||
247 | if (flags & IPERM_FLAG_RCU) { | ||
248 | if (!negative_cached_acl(inode, ACL_TYPE_ACCESS)) | ||
249 | return -ECHILD; | ||
250 | return -EAGAIN; | ||
251 | } | ||
246 | 252 | ||
253 | acl = ext3_get_acl(inode, ACL_TYPE_ACCESS); | ||
247 | if (IS_ERR(acl)) | 254 | if (IS_ERR(acl)) |
248 | return PTR_ERR(acl); | 255 | return PTR_ERR(acl); |
249 | if (acl) { | 256 | if (acl) { |
diff --git a/fs/ext3/acl.h b/fs/ext3/acl.h index 597334626de9..5faf8048e906 100644 --- a/fs/ext3/acl.h +++ b/fs/ext3/acl.h | |||
@@ -54,7 +54,7 @@ static inline int ext3_acl_count(size_t size) | |||
54 | #ifdef CONFIG_EXT3_FS_POSIX_ACL | 54 | #ifdef CONFIG_EXT3_FS_POSIX_ACL |
55 | 55 | ||
56 | /* acl.c */ | 56 | /* acl.c */ |
57 | extern int ext3_check_acl (struct inode *, int); | 57 | extern int ext3_check_acl (struct inode *, int, unsigned int); |
58 | extern int ext3_acl_chmod (struct inode *); | 58 | extern int ext3_acl_chmod (struct inode *); |
59 | extern int ext3_init_acl (handle_t *, struct inode *, struct inode *); | 59 | extern int ext3_init_acl (handle_t *, struct inode *, struct inode *); |
60 | 60 | ||
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index ebc3a9c77067..b7d0554631e4 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -497,6 +497,13 @@ static struct inode *ext3_alloc_inode(struct super_block *sb) | |||
497 | return &ei->vfs_inode; | 497 | return &ei->vfs_inode; |
498 | } | 498 | } |
499 | 499 | ||
500 | static void ext3_i_callback(struct rcu_head *head) | ||
501 | { | ||
502 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
503 | INIT_LIST_HEAD(&inode->i_dentry); | ||
504 | kmem_cache_free(ext3_inode_cachep, EXT3_I(inode)); | ||
505 | } | ||
506 | |||
500 | static void ext3_destroy_inode(struct inode *inode) | 507 | static void ext3_destroy_inode(struct inode *inode) |
501 | { | 508 | { |
502 | if (!list_empty(&(EXT3_I(inode)->i_orphan))) { | 509 | if (!list_empty(&(EXT3_I(inode)->i_orphan))) { |
@@ -507,7 +514,7 @@ static void ext3_destroy_inode(struct inode *inode) | |||
507 | false); | 514 | false); |
508 | dump_stack(); | 515 | dump_stack(); |
509 | } | 516 | } |
510 | kmem_cache_free(ext3_inode_cachep, EXT3_I(inode)); | 517 | call_rcu(&inode->i_rcu, ext3_i_callback); |
511 | } | 518 | } |
512 | 519 | ||
513 | static void init_once(void *foo) | 520 | static void init_once(void *foo) |