From 790fd7dbb25d82922941668197dc2bd760ec437d Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 10 Feb 2009 06:46:05 -0500 Subject: [PATCH] --- yaml --- r: 131378 b: refs/heads/master c: 9eddacf9e9c03578ef2c07c9534423e823d677f8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/super.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index ca71fe546f8b..8d836fcc1816 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c88ccea3143975294f5a52097546bcbb75975f52 +refs/heads/master: 9eddacf9e9c03578ef2c07c9534423e823d677f8 diff --git a/trunk/fs/ext4/super.c b/trunk/fs/ext4/super.c index e5f06a5f045e..a5732c58f676 100644 --- a/trunk/fs/ext4/super.c +++ b/trunk/fs/ext4/super.c @@ -3046,14 +3046,17 @@ 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; trace_mark(ext4_sync_fs, "dev %s wait %d", sb->s_id, wait); sb->s_dirt = 0; if (EXT4_SB(sb)->s_journal) { - if (wait) - ret = ext4_force_commit(sb); - else - jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, NULL); + if (jbd2_journal_start_commit(EXT4_SB(sb)->s_journal, + &target)) { + if (wait) + jbd2_log_wait_commit(EXT4_SB(sb)->s_journal, + target); + } } else { ext4_commit_super(sb, EXT4_SB(sb)->s_es, wait); }