diff options
Diffstat (limited to 'fs/reiserfs/journal.c')
-rw-r--r-- | fs/reiserfs/journal.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index b1a08573fe14..afcadcc03e8a 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -1923,6 +1923,8 @@ static int do_journal_release(struct reiserfs_transaction_handle *th, | |||
1923 | * the workqueue job (flush_async_commit) needs this lock | 1923 | * the workqueue job (flush_async_commit) needs this lock |
1924 | */ | 1924 | */ |
1925 | reiserfs_write_unlock(sb); | 1925 | reiserfs_write_unlock(sb); |
1926 | |||
1927 | cancel_delayed_work_sync(&REISERFS_SB(sb)->old_work); | ||
1926 | flush_workqueue(commit_wq); | 1928 | flush_workqueue(commit_wq); |
1927 | 1929 | ||
1928 | if (!reiserfs_mounted_fs_count) { | 1930 | if (!reiserfs_mounted_fs_count) { |
@@ -3231,8 +3233,6 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *th, | |||
3231 | th->t_trans_id, journal->j_trans_id); | 3233 | th->t_trans_id, journal->j_trans_id); |
3232 | } | 3234 | } |
3233 | 3235 | ||
3234 | sb->s_dirt = 1; | ||
3235 | |||
3236 | prepared = test_clear_buffer_journal_prepared(bh); | 3236 | prepared = test_clear_buffer_journal_prepared(bh); |
3237 | clear_buffer_journal_restore_dirty(bh); | 3237 | clear_buffer_journal_restore_dirty(bh); |
3238 | /* already in this transaction, we are done */ | 3238 | /* already in this transaction, we are done */ |
@@ -3316,6 +3316,7 @@ int journal_mark_dirty(struct reiserfs_transaction_handle *th, | |||
3316 | journal->j_first = cn; | 3316 | journal->j_first = cn; |
3317 | journal->j_last = cn; | 3317 | journal->j_last = cn; |
3318 | } | 3318 | } |
3319 | reiserfs_schedule_old_flush(sb); | ||
3319 | return 0; | 3320 | return 0; |
3320 | } | 3321 | } |
3321 | 3322 | ||
@@ -3492,7 +3493,7 @@ static void flush_async_commits(struct work_struct *work) | |||
3492 | ** flushes any old transactions to disk | 3493 | ** flushes any old transactions to disk |
3493 | ** ends the current transaction if it is too old | 3494 | ** ends the current transaction if it is too old |
3494 | */ | 3495 | */ |
3495 | int reiserfs_flush_old_commits(struct super_block *sb) | 3496 | void reiserfs_flush_old_commits(struct super_block *sb) |
3496 | { | 3497 | { |
3497 | time_t now; | 3498 | time_t now; |
3498 | struct reiserfs_transaction_handle th; | 3499 | struct reiserfs_transaction_handle th; |
@@ -3502,9 +3503,8 @@ int reiserfs_flush_old_commits(struct super_block *sb) | |||
3502 | /* safety check so we don't flush while we are replaying the log during | 3503 | /* safety check so we don't flush while we are replaying the log during |
3503 | * mount | 3504 | * mount |
3504 | */ | 3505 | */ |
3505 | if (list_empty(&journal->j_journal_list)) { | 3506 | if (list_empty(&journal->j_journal_list)) |
3506 | return 0; | 3507 | return; |
3507 | } | ||
3508 | 3508 | ||
3509 | /* check the current transaction. If there are no writers, and it is | 3509 | /* check the current transaction. If there are no writers, and it is |
3510 | * too old, finish it, and force the commit blocks to disk | 3510 | * too old, finish it, and force the commit blocks to disk |
@@ -3526,7 +3526,6 @@ int reiserfs_flush_old_commits(struct super_block *sb) | |||
3526 | do_journal_end(&th, sb, 1, COMMIT_NOW | WAIT); | 3526 | do_journal_end(&th, sb, 1, COMMIT_NOW | WAIT); |
3527 | } | 3527 | } |
3528 | } | 3528 | } |
3529 | return sb->s_dirt; | ||
3530 | } | 3529 | } |
3531 | 3530 | ||
3532 | /* | 3531 | /* |
@@ -3955,7 +3954,7 @@ static int do_journal_end(struct reiserfs_transaction_handle *th, | |||
3955 | ** it tells us if we should continue with the journal_end, or just return | 3954 | ** it tells us if we should continue with the journal_end, or just return |
3956 | */ | 3955 | */ |
3957 | if (!check_journal_end(th, sb, nblocks, flags)) { | 3956 | if (!check_journal_end(th, sb, nblocks, flags)) { |
3958 | sb->s_dirt = 1; | 3957 | reiserfs_schedule_old_flush(sb); |
3959 | wake_queued_writers(sb); | 3958 | wake_queued_writers(sb); |
3960 | reiserfs_async_progress_wait(sb); | 3959 | reiserfs_async_progress_wait(sb); |
3961 | goto out; | 3960 | goto out; |