--- linux-2.4-ext3merge/fs/jbd/transaction.c.=K0014=.orig Fri Nov 8 12:49:30 2002 +++ linux-2.4-ext3merge/fs/jbd/transaction.c Mon Nov 11 13:11:01 2002 @@ -1121,7 +1121,6 @@ spin_lock(&journal_datalist_lock); set_bit(BH_JBDDirty, &bh->b_state); - set_buffer_flushtime(bh); J_ASSERT_JH(jh, jh->b_transaction != NULL); @@ -2057,6 +2056,13 @@ spin_unlock(&journal_datalist_lock); } +static void jbd_refile_buffer(struct buffer_head *bh) +{ + if (buffer_dirty(bh) && (bh->b_list != BUF_DIRTY)) + set_buffer_flushtime(bh); + refile_buffer(bh); +} + /* * Remove a buffer from its current buffer list in preparation for * dropping it from its current transaction entirely. If the buffer has @@ -2077,7 +2083,7 @@ __journal_unfile_buffer(jh); jh->b_transaction = NULL; /* Onto BUF_DIRTY for writeback */ - refile_buffer(jh2bh(jh)); + jbd_refile_buffer(jh2bh(jh)); return; }