aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r--fs/ext4/ialloc.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 6e6052879aa2..9dd21b75f4bc 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -253,12 +253,12 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
253 spin_unlock(sb_bgl_lock(sbi, flex_group)); 253 spin_unlock(sb_bgl_lock(sbi, flex_group));
254 } 254 }
255 } 255 }
256 BUFFER_TRACE(bh2, "call ext4_journal_dirty_metadata"); 256 BUFFER_TRACE(bh2, "call ext4_handle_dirty_metadata");
257 err = ext4_journal_dirty_metadata(handle, bh2); 257 err = ext4_handle_dirty_metadata(handle, NULL, bh2);
258 if (!fatal) fatal = err; 258 if (!fatal) fatal = err;
259 } 259 }
260 BUFFER_TRACE(bitmap_bh, "call ext4_journal_dirty_metadata"); 260 BUFFER_TRACE(bitmap_bh, "call ext4_handle_dirty_metadata");
261 err = ext4_journal_dirty_metadata(handle, bitmap_bh); 261 err = ext4_handle_dirty_metadata(handle, NULL, bitmap_bh);
262 if (!fatal) 262 if (!fatal)
263 fatal = err; 263 fatal = err;
264 sb->s_dirt = 1; 264 sb->s_dirt = 1;
@@ -656,15 +656,16 @@ repeat_in_this_group:
656 ino, bitmap_bh->b_data)) { 656 ino, bitmap_bh->b_data)) {
657 /* we won it */ 657 /* we won it */
658 BUFFER_TRACE(bitmap_bh, 658 BUFFER_TRACE(bitmap_bh,
659 "call ext4_journal_dirty_metadata"); 659 "call ext4_handle_dirty_metadata");
660 err = ext4_journal_dirty_metadata(handle, 660 err = ext4_handle_dirty_metadata(handle,
661 inode,
661 bitmap_bh); 662 bitmap_bh);
662 if (err) 663 if (err)
663 goto fail; 664 goto fail;
664 goto got; 665 goto got;
665 } 666 }
666 /* we lost it */ 667 /* we lost it */
667 jbd2_journal_release_buffer(handle, bitmap_bh); 668 ext4_handle_release_buffer(handle, bitmap_bh);
668 669
669 if (++ino < EXT4_INODES_PER_GROUP(sb)) 670 if (++ino < EXT4_INODES_PER_GROUP(sb))
670 goto repeat_in_this_group; 671 goto repeat_in_this_group;
@@ -726,7 +727,8 @@ got:
726 /* Don't need to dirty bitmap block if we didn't change it */ 727 /* Don't need to dirty bitmap block if we didn't change it */
727 if (free) { 728 if (free) {
728 BUFFER_TRACE(block_bh, "dirty block bitmap"); 729 BUFFER_TRACE(block_bh, "dirty block bitmap");
729 err = ext4_journal_dirty_metadata(handle, block_bh); 730 err = ext4_handle_dirty_metadata(handle,
731 NULL, block_bh);
730 } 732 }
731 733
732 brelse(block_bh); 734 brelse(block_bh);
@@ -771,8 +773,8 @@ got:
771 } 773 }
772 gdp->bg_checksum = ext4_group_desc_csum(sbi, group, gdp); 774 gdp->bg_checksum = ext4_group_desc_csum(sbi, group, gdp);
773 spin_unlock(sb_bgl_lock(sbi, group)); 775 spin_unlock(sb_bgl_lock(sbi, group));
774 BUFFER_TRACE(bh2, "call ext4_journal_dirty_metadata"); 776 BUFFER_TRACE(bh2, "call ext4_handle_dirty_metadata");
775 err = ext4_journal_dirty_metadata(handle, bh2); 777 err = ext4_handle_dirty_metadata(handle, NULL, bh2);
776 if (err) goto fail; 778 if (err) goto fail;
777 779
778 percpu_counter_dec(&sbi->s_freeinodes_counter); 780 percpu_counter_dec(&sbi->s_freeinodes_counter);
@@ -825,7 +827,7 @@ got:
825 827
826 ext4_set_inode_flags(inode); 828 ext4_set_inode_flags(inode);
827 if (IS_DIRSYNC(inode)) 829 if (IS_DIRSYNC(inode))
828 handle->h_sync = 1; 830 ext4_handle_sync(handle);
829 if (insert_inode_locked(inode) < 0) { 831 if (insert_inode_locked(inode) < 0) {
830 err = -EINVAL; 832 err = -EINVAL;
831 goto fail_drop; 833 goto fail_drop;
@@ -1028,4 +1030,3 @@ unsigned long ext4_count_dirs(struct super_block * sb)
1028 } 1030 }
1029 return count; 1031 return count;
1030} 1032}
1031