There's some nasty code in commit which deals with a lock ranking problem. 
Currently if it fails to get the lock when and local variable `bufs' is zero
we forget to write out some ordered-data buffers.  So a subsequent
crash+recovery could yield stale data in existing files.

Fix it by correctly restarting the t_sync_datalist search.


---

 25-akpm/fs/jbd/commit.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN fs/jbd/commit.c~jbd-commit-ordered-fix fs/jbd/commit.c
--- 25/fs/jbd/commit.c~jbd-commit-ordered-fix	Thu Mar 18 14:08:13 2004
+++ 25-akpm/fs/jbd/commit.c	Thu Mar 18 14:28:52 2004
@@ -262,8 +262,7 @@ write_out_data_locked:
 				if (!jbd_trylock_bh_state(bh)) {
 					spin_unlock(&journal->j_list_lock);
 					schedule();
-					spin_lock(&journal->j_list_lock);
-					break;
+					goto write_out_data;
 				}
 				__journal_unfile_buffer(jh);
 				jh->b_transaction = NULL;

_