Message ID | 200811031934.mA3JYJ5c023221@imap1.linux-foundation.org |
---|---|
State | Accepted, archived |
Headers | show |
diff -puN fs/ext3/super.c~ext3-wait-on-all-pending-commits-in-ext3_sync_fs fs/ext3/super.c --- a/fs/ext3/super.c~ext3-wait-on-all-pending-commits-in-ext3_sync_fs +++ a/fs/ext3/super.c @@ -2396,7 +2396,13 @@ static int ext3_sync_fs(struct super_blo if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) { if (wait) log_wait_commit(EXT3_SB(sb)->s_journal, target); - } + } else if (wait) + /* + * We may have a commit in progress, clear it out + * before we go on... + */ + ext3_force_commit(sb); + return 0; }