JBD: update transaction t_state to T_COMMIT fix We need to hold the j_state_lock to update the current transaction's t_state Signed-off-by: Mingming Cao --- fs/jbd/commit.c | 2 ++ 1 file changed, 2 insertions(+) Index: linux-2.6.26-rc1/fs/jbd/commit.c =================================================================== --- linux-2.6.26-rc1.orig/fs/jbd/commit.c 2008-05-09 14:46:25.000000000 -0700 +++ linux-2.6.26-rc1/fs/jbd/commit.c 2008-05-09 15:11:00.000000000 -0700 @@ -478,7 +478,9 @@ void journal_commit_transaction(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);