--- linux-2.4.20-ext3merge/fs/jbd/transaction.c.=K0010=.orig 2002-11-28 23:53:15.000000000 +0000 +++ linux-2.4.20-ext3merge/fs/jbd/transaction.c 2002-12-02 15:57:51.000000000 +0000 @@ -1109,7 +1109,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); @@ -2035,6 +2034,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 @@ -2055,7 +2061,7 @@ __journal_unfile_buffer(jh); jh->b_transaction = NULL; /* Onto BUF_DIRTY for writeback */ - refile_buffer(jh2bh(jh)); + jbd_refile_buffer(jh2bh(jh)); return; }