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 2004-04-03 02:59:56.286796048 -0800 +++ 25-akpm/fs/jbd/commit.c 2004-04-03 02:59:56.290795440 -0800 @@ -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; _