diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 35bd2752f..7898983c9 100755 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c @@ -115,12 +115,9 @@ __releases(&journal->j_state_lock) if (space_left < nblocks) { int chkpt = journal->j_checkpoint_transactions != NULL; tid_t tid = 0; - bool has_transaction = false; - if (journal->j_committing_transaction) { + if (journal->j_committing_transaction) tid = journal->j_committing_transaction->t_tid; - has_transaction = true; - } spin_unlock(&journal->j_list_lock); write_unlock(&journal->j_state_lock); if (chkpt) { @@ -128,7 +125,7 @@ __releases(&journal->j_state_lock) } else if (jbd2_cleanup_journal_tail(journal) == 0) { /* We were able to recover space; yay! */ ; - } else if (has_transaction) { + } else if (tid) { /* * jbd2_journal_commit_transaction() may want * to take the checkpoint_mutex if JBD2_FLUSHED