diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1a03ea98fdd1..f095c60b569e 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -687,6 +687,8 @@ static struct inode *ext4_alloc_inode(struct super_block *sb) | |||
687 | ei->i_allocated_meta_blocks = 0; | 687 | ei->i_allocated_meta_blocks = 0; |
688 | ei->i_delalloc_reserved_flag = 0; | 688 | ei->i_delalloc_reserved_flag = 0; |
689 | spin_lock_init(&(ei->i_block_reservation_lock)); | 689 | spin_lock_init(&(ei->i_block_reservation_lock)); |
690 | INIT_LIST_HEAD(&ei->i_aio_dio_complete_list); | ||
691 | ei->cur_aio_dio = NULL; | ||
690 | 692 | ||
691 | return &ei->vfs_inode; | 693 | return &ei->vfs_inode; |
692 | } | 694 | } |
@@ -3375,11 +3377,13 @@ static int ext4_sync_fs(struct super_block *sb, int wait) | |||
3375 | { | 3377 | { |
3376 | int ret = 0; | 3378 | int ret = 0; |
3377 | tid_t target; | 3379 | tid_t target; |
3380 | struct ext4_sb_info *sbi = EXT4_SB(sb); | ||
3378 | 3381 | ||
3379 | trace_ext4_sync_fs(sb, wait); | 3382 | trace_ext4_sync_fs(sb, wait); |
3380 | if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, &target)) { | 3383 | flush_workqueue(sbi->dio_unwritten_wq); |
3384 | if (jbd2_journal_start_commit(sbi->s_journal, &target)) { | ||
3381 | if (wait) | 3385 | if (wait) |
3382 | jbd2_log_wait_commit(EXT4_SB(sb)->s_journal, target); | 3386 | jbd2_log_wait_commit(sbi->s_journal, target); |
3383 | } | 3387 | } |
3384 | return ret; | 3388 | return ret; |
3385 | } | 3389 | } |