diff options
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 4fb86a0061d0..627f8c3337a3 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -188,7 +188,7 @@ void ext4_free_inode(handle_t *handle, struct inode *inode) | |||
188 | struct ext4_group_desc *gdp; | 188 | struct ext4_group_desc *gdp; |
189 | struct ext4_super_block *es; | 189 | struct ext4_super_block *es; |
190 | struct ext4_sb_info *sbi; | 190 | struct ext4_sb_info *sbi; |
191 | int fatal = 0, err, count; | 191 | int fatal = 0, err, count, cleared; |
192 | ext4_group_t flex_group; | 192 | ext4_group_t flex_group; |
193 | 193 | ||
194 | if (atomic_read(&inode->i_count) > 1) { | 194 | if (atomic_read(&inode->i_count) > 1) { |
@@ -248,8 +248,10 @@ void ext4_free_inode(handle_t *handle, struct inode *inode) | |||
248 | goto error_return; | 248 | goto error_return; |
249 | 249 | ||
250 | /* Ok, now we can actually update the inode bitmaps.. */ | 250 | /* Ok, now we can actually update the inode bitmaps.. */ |
251 | if (!ext4_clear_bit_atomic(sb_bgl_lock(sbi, block_group), | 251 | spin_lock(sb_bgl_lock(sbi, block_group)); |
252 | bit, bitmap_bh->b_data)) | 252 | cleared = ext4_clear_bit(bit, bitmap_bh->b_data); |
253 | spin_unlock(sb_bgl_lock(sbi, block_group)); | ||
254 | if (!cleared) | ||
253 | ext4_error(sb, "ext4_free_inode", | 255 | ext4_error(sb, "ext4_free_inode", |
254 | "bit already cleared for inode %lu", ino); | 256 | "bit already cleared for inode %lu", ino); |
255 | else { | 257 | else { |
@@ -715,6 +717,13 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode) | |||
715 | 717 | ||
716 | if (sbi->s_log_groups_per_flex) { | 718 | if (sbi->s_log_groups_per_flex) { |
717 | ret2 = find_group_flex(sb, dir, &group); | 719 | ret2 = find_group_flex(sb, dir, &group); |
720 | if (ret2 == -1) { | ||
721 | ret2 = find_group_other(sb, dir, &group); | ||
722 | if (ret2 == 0 && printk_ratelimit()) | ||
723 | printk(KERN_NOTICE "ext4: find_group_flex " | ||
724 | "failed, fallback succeeded dir %lu\n", | ||
725 | dir->i_ino); | ||
726 | } | ||
718 | goto got_group; | 727 | goto got_group; |
719 | } | 728 | } |
720 | 729 | ||