Message ID | 1235495694-8116-2-git-send-email-tytso@mit.edu |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 5e4491d..db2642a 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2950,14 +2950,14 @@ static void ext4_write_super(struct super_block *sb) static int ext4_sync_fs(struct super_block *sb, int wait) { - int ret = 0; + tid_t target; sb->s_dirt = 0; - if (wait) - ret = ext4_force_commit(sb); - else - jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, NULL); - return ret; + if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, &target)) { + if (wait) + jbd2_log_wait_commit(EXT4_SB(sb)->s_journal, target); + } + return 0; } /*