Commit 6e1b8d42 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] JBD: remove j_commit_timer_active

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.
parent 319a1ad4
...@@ -157,11 +157,8 @@ int kjournald(void *arg) ...@@ -157,11 +157,8 @@ int kjournald(void *arg)
if (journal->j_commit_sequence != journal->j_commit_request) { if (journal->j_commit_sequence != journal->j_commit_request) {
jbd_debug(1, "OK, requests differ\n"); 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); spin_unlock(&journal->j_state_lock);
del_timer_sync(journal->j_commit_timer);
journal_commit_transaction(journal); journal_commit_transaction(journal);
spin_lock(&journal->j_state_lock); spin_lock(&journal->j_state_lock);
goto loop; goto loop;
...@@ -217,12 +214,8 @@ int kjournald(void *arg) ...@@ -217,12 +214,8 @@ int kjournald(void *arg)
if (!(journal->j_flags & JFS_UNMOUNT)) if (!(journal->j_flags & JFS_UNMOUNT))
goto loop; 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); spin_unlock(&journal->j_state_lock);
del_timer_sync(journal->j_commit_timer);
journal->j_task = NULL; journal->j_task = NULL;
wake_up(&journal->j_wait_done_commit); wake_up(&journal->j_wait_done_commit);
jbd_debug(1, "Journal thread exiting.\n"); jbd_debug(1, "Journal thread exiting.\n");
......
...@@ -55,8 +55,6 @@ get_transaction(journal_t *journal, transaction_t *transaction) ...@@ -55,8 +55,6 @@ get_transaction(journal_t *journal, transaction_t *transaction)
spin_lock_init(&transaction->t_jcb_lock); spin_lock_init(&transaction->t_jcb_lock);
/* Set up the commit timer for the new transaction. */ /* 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; journal->j_commit_timer->expires = transaction->t_expires;
add_timer(journal->j_commit_timer); add_timer(journal->j_commit_timer);
......
...@@ -626,7 +626,6 @@ struct transaction_s ...@@ -626,7 +626,6 @@ struct transaction_s
* @j_commit_interval: What is the maximum transaction lifetime before we begin * @j_commit_interval: What is the maximum transaction lifetime before we begin
* a commit? * a commit?
* @j_commit_timer: The timer used to wakeup the commit thread * @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 * @j_revoke: The revoke table - maintains the list of revoked blocks in the
* current transaction. * current transaction.
*/ */
...@@ -802,7 +801,6 @@ struct journal_s ...@@ -802,7 +801,6 @@ struct journal_s
/* The timer used to wakeup the commit thread: */ /* The timer used to wakeup the commit thread: */
struct timer_list *j_commit_timer; 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 * The revoke table: maintains the list of revoked blocks in the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment