X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fjbd%2Fcommit.c;h=5a8ca61498caf36cbb818fddc00eafbca2642f03;hb=458a9f617adfb2fc5f38e7673339115c4ba3290f;hp=a38c7186c5704e438236994baa18014b4bacb801;hpb=c58310bf4933986513020fa90b4190c7492995ae;p=linux-2.6-omap-h63xx.git diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index a38c7186c57..5a8ca61498c 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -406,22 +406,6 @@ void journal_commit_transaction(journal_t *journal) jbd_debug (3, "JBD: commit phase 2\n"); - /* - * First, drop modified flag: all accesses to the buffers - * will be tracked for a new trasaction only -bzzz - */ - spin_lock(&journal->j_list_lock); - if (commit_transaction->t_buffers) { - new_jh = jh = commit_transaction->t_buffers->b_tnext; - do { - J_ASSERT_JH(new_jh, new_jh->b_modified == 1 || - new_jh->b_modified == 0); - new_jh->b_modified = 0; - new_jh = new_jh->b_tnext; - } while (new_jh != jh); - } - spin_unlock(&journal->j_list_lock); - /* * Now start flushing things to disk, in the order they appear * on the transaction lists. Data blocks go first. @@ -486,7 +470,12 @@ void journal_commit_transaction(journal_t *journal) * transaction! Now comes the tricky part: we need to write out * metadata. Loop over the transaction's entire buffer list: */ + spin_lock(&journal->j_state_lock); commit_transaction->t_state = T_COMMIT; + spin_unlock(&journal->j_state_lock); + + J_ASSERT(commit_transaction->t_nr_buffers <= + commit_transaction->t_outstanding_credits); descriptor = NULL; bufs = 0;