Revert "ext4: fix incorrect tid assumption in __jbd2_log_wait_for_space()"

This reverts commit 12dbad5099.
This commit is contained in:
Ksawlii 2024-11-24 00:23:04 +01:00
parent c8162dd5e3
commit d97a370085

View file

@ -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