Signed-off-by: Andrew Morton --- 25-akpm/fs/jbd/transaction.c | 12 +++++++----- 25-akpm/include/linux/journal-head.h | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff -puN fs/jbd/transaction.c~jbd-journal-overflow-fix-fixes fs/jbd/transaction.c --- 25/fs/jbd/transaction.c~jbd-journal-overflow-fix-fixes 2005-01-22 18:22:38.384060304 -0800 +++ 25-akpm/fs/jbd/transaction.c 2005-01-22 18:22:38.391059240 -0800 @@ -730,8 +730,10 @@ done: kunmap_atomic(source, KM_USER0); } - /* track all references to the block to be able to recognize the - * situation when the buffer is not part of transaction -bzzz */ + /* + * Track all references to the block to be able to recognize the + * situation when the buffer is not part of transaction -bzzz + */ jh->b_tcount++; jbd_unlock_bh_state(bh); @@ -1208,18 +1210,18 @@ journal_release_buffer(handle_t *handle, handle->h_buffer_credits++; jbd_lock_bh_state(bh); - J_ASSERT(jh->b_tcount > 0); + J_ASSERT_JH(jh, jh->b_tcount > 0); jh->b_tcount--; if (jh->b_tcount == 0) { /* we can drop it from the transaction -bzzz */ J_ASSERT(jh->b_transaction == handle->h_transaction || - jh->b_next_transaction == handle->h_transaction); + jh->b_next_transaction == handle->h_transaction); if (jh->b_transaction == handle->h_transaction) { spin_lock(&journal->j_list_lock); __journal_unfile_buffer(jh); spin_unlock(&journal->j_list_lock); - } else if(jh->b_next_transaction) { + } else if (jh->b_next_transaction) { jh->b_next_transaction = NULL; } diff -puN include/linux/journal-head.h~jbd-journal-overflow-fix-fixes include/linux/journal-head.h --- 25/include/linux/journal-head.h~jbd-journal-overflow-fix-fixes 2005-01-22 18:22:38.385060152 -0800 +++ 25-akpm/include/linux/journal-head.h 2005-01-22 18:22:38.391059240 -0800 @@ -83,6 +83,7 @@ struct journal_head { /* * counter to track users of the buffer in current transaction + * [jbd_lock_bh_state()] */ int b_tcount; }; _