Ad a comment describing why a race isn't there.



 fs/jbd/transaction.c |    5 +++++
 1 files changed, 5 insertions(+)

diff -puN fs/jbd/transaction.c~jbd-540-journal_try_to_free_buffers-race-fix fs/jbd/transaction.c
--- 25/fs/jbd/transaction.c~jbd-540-journal_try_to_free_buffers-race-fix	2003-05-26 12:46:39.000000000 -0700
+++ 25-akpm/fs/jbd/transaction.c	2003-05-26 12:49:14.000000000 -0700
@@ -1651,6 +1651,11 @@ int journal_try_to_free_buffers(journal_
 	bh = head;
 	do {
 		jbd_lock_bh_state(bh);
+		/*
+		 * We don't have to worry about the buffer being pulled off its
+		 * journal_head in here, because __try_to_free_cp_buf runs
+		 * under jbd_lock_bh_state()
+		 */
 		if (buffer_jbd(bh) &&
 				!__journal_try_to_free_buffer(journal, bh)) {
 			jbd_unlock_bh_state(bh);

_