--- linux-2.4.21-pre3-rmap-ext3merge/fs/jbd/transaction.c.=K0002=.orig 2003-01-23 16:29:21.000000000 +0000 +++ linux-2.4.21-pre3-rmap-ext3merge/fs/jbd/transaction.c 2003-01-23 16:29:21.000000000 +0000 @@ -1136,7 +1136,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); @@ -2088,6 +2087,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 @@ -2108,7 +2114,7 @@ __journal_unfile_buffer(jh); jh->b_transaction = NULL; /* Onto BUF_DIRTY for writeback */ - refile_buffer(jh2bh(jh)); + jbd_refile_buffer(jh2bh(jh)); return; }