diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index e5f06a5f045e..a5732c58f676 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -3046,14 +3046,17 @@ static void ext4_write_super(struct super_block *sb) | |||
3046 | static int ext4_sync_fs(struct super_block *sb, int wait) | 3046 | static int ext4_sync_fs(struct super_block *sb, int wait) |
3047 | { | 3047 | { |
3048 | int ret = 0; | 3048 | int ret = 0; |
3049 | tid_t target; | ||
3049 | 3050 | ||
3050 | trace_mark(ext4_sync_fs, "dev %s wait %d", sb->s_id, wait); | 3051 | trace_mark(ext4_sync_fs, "dev %s wait %d", sb->s_id, wait); |
3051 | sb->s_dirt = 0; | 3052 | sb->s_dirt = 0; |
3052 | if (EXT4_SB(sb)->s_journal) { | 3053 | if (EXT4_SB(sb)->s_journal) { |
3053 | if (wait) | 3054 | if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, |
3054 | ret = ext4_force_commit(sb); | 3055 | &target)) { |
3055 | else | 3056 | if (wait) |
3056 | jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, NULL); | 3057 | jbd2_log_wait_commit(EXT4_SB(sb)->s_journal, |
3058 | target); | ||
3059 | } | ||
3057 | } else { | 3060 | } else { |
3058 | ext4_commit_super(sb, EXT4_SB(sb)->s_es, wait); | 3061 | ext4_commit_super(sb, EXT4_SB(sb)->s_es, wait); |
3059 | } | 3062 | } |