--- linux-2.4-ext3merge/fs/jbd/transaction.c.=K0001=.orig 2003-03-13 16:22:34.000000000 +0000 +++ linux-2.4-ext3merge/fs/jbd/transaction.c 2003-03-14 18:20:37.000000000 +0000 @@ -1137,7 +1137,6 @@ int journal_dirty_metadata (handle_t *ha spin_lock(&journal_datalist_lock); set_bit(BH_JBDDirty, &bh->b_state); - set_buffer_flushtime(bh); J_ASSERT_JH(jh, jh->b_transaction != NULL); @@ -2089,6 +2088,13 @@ void journal_file_buffer(struct journal_ 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 @@ -2109,7 +2115,7 @@ void __journal_refile_buffer(struct jour __journal_unfile_buffer(jh); jh->b_transaction = NULL; /* Onto BUF_DIRTY for writeback */ - refile_buffer(jh2bh(jh)); + jbd_refile_buffer(jh2bh(jh)); return; }