This was a flag which said "the transaction's time is active". timer_pending() could have told us that, but in fact there is no need to query it at all. fs/jbd/journal.c | 11 ++--------- fs/jbd/transaction.c | 2 -- include/linux/jbd.h | 2 -- 3 files changed, 2 insertions(+), 13 deletions(-) diff -puN fs/jbd/journal.c~jbd-630-remove-j_commit_timer_active fs/jbd/journal.c --- 25/fs/jbd/journal.c~jbd-630-remove-j_commit_timer_active 2003-06-08 14:44:57.000000000 -0700 +++ 25-akpm/fs/jbd/journal.c 2003-06-08 14:45:55.000000000 -0700 @@ -157,11 +157,8 @@ loop: if (journal->j_commit_sequence != journal->j_commit_request) { jbd_debug(1, "OK, requests differ\n"); - if (journal->j_commit_timer_active) { - journal->j_commit_timer_active = 0; - del_timer(journal->j_commit_timer); - } spin_unlock(&journal->j_state_lock); + del_timer_sync(journal->j_commit_timer); journal_commit_transaction(journal); spin_lock(&journal->j_state_lock); goto loop; @@ -217,12 +214,8 @@ loop: if (!(journal->j_flags & JFS_UNMOUNT)) goto loop; - if (journal->j_commit_timer_active) { - journal->j_commit_timer_active = 0; - del_timer_sync(journal->j_commit_timer); - } spin_unlock(&journal->j_state_lock); - + del_timer_sync(journal->j_commit_timer); journal->j_task = NULL; wake_up(&journal->j_wait_done_commit); jbd_debug(1, "Journal thread exiting.\n"); diff -puN fs/jbd/transaction.c~jbd-630-remove-j_commit_timer_active fs/jbd/transaction.c --- 25/fs/jbd/transaction.c~jbd-630-remove-j_commit_timer_active 2003-06-08 14:44:57.000000000 -0700 +++ 25-akpm/fs/jbd/transaction.c 2003-06-08 14:46:15.000000000 -0700 @@ -55,8 +55,6 @@ get_transaction(journal_t *journal, tran spin_lock_init(&transaction->t_jcb_lock); /* Set up the commit timer for the new transaction. */ - J_ASSERT(!journal->j_commit_timer_active); - journal->j_commit_timer_active = 1; journal->j_commit_timer->expires = transaction->t_expires; add_timer(journal->j_commit_timer); diff -puN include/linux/jbd.h~jbd-630-remove-j_commit_timer_active include/linux/jbd.h --- 25/include/linux/jbd.h~jbd-630-remove-j_commit_timer_active 2003-06-08 14:44:57.000000000 -0700 +++ 25-akpm/include/linux/jbd.h 2003-06-08 14:46:24.000000000 -0700 @@ -626,7 +626,6 @@ struct transaction_s * @j_commit_interval: What is the maximum transaction lifetime before we begin * a commit? * @j_commit_timer: The timer used to wakeup the commit thread - * @j_commit_timer_active: Timer flag * @j_revoke: The revoke table - maintains the list of revoked blocks in the * current transaction. */ @@ -802,7 +801,6 @@ struct journal_s /* The timer used to wakeup the commit thread: */ struct timer_list *j_commit_timer; - int j_commit_timer_active; /* [j_state_lock] */ /* * The revoke table: maintains the list of revoked blocks in the _