diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/acl.c | 11 | ||||
-rw-r--r-- | fs/ext4/acl.h | 2 | ||||
-rw-r--r-- | fs/ext4/resize.c | 5 | ||||
-rw-r--r-- | fs/ext4/super.c | 9 |
4 files changed, 23 insertions, 4 deletions
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c index 5e2ed4504ead..e0270d1f8d82 100644 --- a/fs/ext4/acl.c +++ b/fs/ext4/acl.c | |||
@@ -238,10 +238,17 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type, | |||
238 | } | 238 | } |
239 | 239 | ||
240 | int | 240 | int |
241 | ext4_check_acl(struct inode *inode, int mask) | 241 | ext4_check_acl(struct inode *inode, int mask, unsigned int flags) |
242 | { | 242 | { |
243 | struct posix_acl *acl = ext4_get_acl(inode, ACL_TYPE_ACCESS); | 243 | struct posix_acl *acl; |
244 | |||
245 | if (flags & IPERM_FLAG_RCU) { | ||
246 | if (!negative_cached_acl(inode, ACL_TYPE_ACCESS)) | ||
247 | return -ECHILD; | ||
248 | return -EAGAIN; | ||
249 | } | ||
244 | 250 | ||
251 | acl = ext4_get_acl(inode, ACL_TYPE_ACCESS); | ||
245 | if (IS_ERR(acl)) | 252 | if (IS_ERR(acl)) |
246 | return PTR_ERR(acl); | 253 | return PTR_ERR(acl); |
247 | if (acl) { | 254 | if (acl) { |
diff --git a/fs/ext4/acl.h b/fs/ext4/acl.h index 9d843d5deac4..dec821168fd4 100644 --- a/fs/ext4/acl.h +++ b/fs/ext4/acl.h | |||
@@ -54,7 +54,7 @@ static inline int ext4_acl_count(size_t size) | |||
54 | #ifdef CONFIG_EXT4_FS_POSIX_ACL | 54 | #ifdef CONFIG_EXT4_FS_POSIX_ACL |
55 | 55 | ||
56 | /* acl.c */ | 56 | /* acl.c */ |
57 | extern int ext4_check_acl(struct inode *, int); | 57 | extern int ext4_check_acl(struct inode *, int, unsigned int); |
58 | extern int ext4_acl_chmod(struct inode *); | 58 | extern int ext4_acl_chmod(struct inode *); |
59 | extern int ext4_init_acl(handle_t *, struct inode *, struct inode *); | 59 | extern int ext4_init_acl(handle_t *, struct inode *, struct inode *); |
60 | 60 | ||
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 7faf47dde7fb..3ecc6e45d2f9 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -236,6 +236,8 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
236 | GFP_NOFS); | 236 | GFP_NOFS); |
237 | if (err) | 237 | if (err) |
238 | goto exit_bh; | 238 | goto exit_bh; |
239 | for (i = 0, bit = gdblocks + 1; i < reserved_gdb; i++, bit++) | ||
240 | ext4_set_bit(bit, bh->b_data); | ||
239 | 241 | ||
240 | ext4_debug("mark block bitmap %#04llx (+%llu)\n", input->block_bitmap, | 242 | ext4_debug("mark block bitmap %#04llx (+%llu)\n", input->block_bitmap, |
241 | input->block_bitmap - start); | 243 | input->block_bitmap - start); |
@@ -251,6 +253,9 @@ static int setup_new_group_blocks(struct super_block *sb, | |||
251 | err = sb_issue_zeroout(sb, block, sbi->s_itb_per_group, GFP_NOFS); | 253 | err = sb_issue_zeroout(sb, block, sbi->s_itb_per_group, GFP_NOFS); |
252 | if (err) | 254 | if (err) |
253 | goto exit_bh; | 255 | goto exit_bh; |
256 | for (i = 0, bit = input->inode_table - start; | ||
257 | i < sbi->s_itb_per_group; i++, bit++) | ||
258 | ext4_set_bit(bit, bh->b_data); | ||
254 | 259 | ||
255 | if ((err = extend_or_restart_transaction(handle, 2, bh))) | 260 | if ((err = extend_or_restart_transaction(handle, 2, bh))) |
256 | goto exit_bh; | 261 | goto exit_bh; |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 757cb24c0256..29c80f6d8b27 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -845,6 +845,13 @@ static int ext4_drop_inode(struct inode *inode) | |||
845 | return drop; | 845 | return drop; |
846 | } | 846 | } |
847 | 847 | ||
848 | static void ext4_i_callback(struct rcu_head *head) | ||
849 | { | ||
850 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
851 | INIT_LIST_HEAD(&inode->i_dentry); | ||
852 | kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); | ||
853 | } | ||
854 | |||
848 | static void ext4_destroy_inode(struct inode *inode) | 855 | static void ext4_destroy_inode(struct inode *inode) |
849 | { | 856 | { |
850 | ext4_ioend_wait(inode); | 857 | ext4_ioend_wait(inode); |
@@ -857,7 +864,7 @@ static void ext4_destroy_inode(struct inode *inode) | |||
857 | true); | 864 | true); |
858 | dump_stack(); | 865 | dump_stack(); |
859 | } | 866 | } |
860 | kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); | 867 | call_rcu(&inode->i_rcu, ext4_i_callback); |
861 | } | 868 | } |
862 | 869 | ||
863 | static void init_once(void *foo) | 870 | static void init_once(void *foo) |