aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jbd/commit.c')
-rw-r--r--fs/jbd/commit.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
index a38c7186c570..5a8ca61498ca 100644
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -407,22 +407,6 @@ void journal_commit_transaction(journal_t *journal)
407 jbd_debug (3, "JBD: commit phase 2\n"); 407 jbd_debug (3, "JBD: commit phase 2\n");
408 408
409 /* 409 /*
410 * First, drop modified flag: all accesses to the buffers
411 * will be tracked for a new trasaction only -bzzz
412 */
413 spin_lock(&journal->j_list_lock);
414 if (commit_transaction->t_buffers) {
415 new_jh = jh = commit_transaction->t_buffers->b_tnext;
416 do {
417 J_ASSERT_JH(new_jh, new_jh->b_modified == 1 ||
418 new_jh->b_modified == 0);
419 new_jh->b_modified = 0;
420 new_jh = new_jh->b_tnext;
421 } while (new_jh != jh);
422 }
423 spin_unlock(&journal->j_list_lock);
424
425 /*
426 * Now start flushing things to disk, in the order they appear 410 * Now start flushing things to disk, in the order they appear
427 * on the transaction lists. Data blocks go first. 411 * on the transaction lists. Data blocks go first.
428 */ 412 */
@@ -486,7 +470,12 @@ void journal_commit_transaction(journal_t *journal)
486 * transaction! Now comes the tricky part: we need to write out 470 * transaction! Now comes the tricky part: we need to write out
487 * metadata. Loop over the transaction's entire buffer list: 471 * metadata. Loop over the transaction's entire buffer list:
488 */ 472 */
473 spin_lock(&journal->j_state_lock);
489 commit_transaction->t_state = T_COMMIT; 474 commit_transaction->t_state = T_COMMIT;
475 spin_unlock(&journal->j_state_lock);
476
477 J_ASSERT(commit_transaction->t_nr_buffers <=
478 commit_transaction->t_outstanding_credits);
490 479
491 descriptor = NULL; 480 descriptor = NULL;
492 bufs = 0; 481 bufs = 0;