Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[safe/jmp/linux-2.6] / fs / ext3 / super.c
index b70d90e..4a97041 100644 (file)
@@ -2428,12 +2428,13 @@ static void ext3_write_super (struct super_block * sb)
 
 static int ext3_sync_fs(struct super_block *sb, int wait)
 {
-       sb->s_dirt = 0;
-       if (wait)
-               ext3_force_commit(sb);
-       else
-               journal_start_commit(EXT3_SB(sb)->s_journal, NULL);
+       tid_t target;
 
+       sb->s_dirt = 0;
+       if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) {
+               if (wait)
+                       log_wait_commit(EXT3_SB(sb)->s_journal, target);
+       }
        return 0;
 }