Revert "ext4: fix incorrect tid assumption in __jbd2_log_wait_for_space()"
This reverts commit 12dbad5099
.
This commit is contained in:
parent
c8162dd5e3
commit
d97a370085
1 changed files with 2 additions and 5 deletions
|
@ -115,12 +115,9 @@ __releases(&journal->j_state_lock)
|
||||||
if (space_left < nblocks) {
|
if (space_left < nblocks) {
|
||||||
int chkpt = journal->j_checkpoint_transactions != NULL;
|
int chkpt = journal->j_checkpoint_transactions != NULL;
|
||||||
tid_t tid = 0;
|
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;
|
tid = journal->j_committing_transaction->t_tid;
|
||||||
has_transaction = true;
|
|
||||||
}
|
|
||||||
spin_unlock(&journal->j_list_lock);
|
spin_unlock(&journal->j_list_lock);
|
||||||
write_unlock(&journal->j_state_lock);
|
write_unlock(&journal->j_state_lock);
|
||||||
if (chkpt) {
|
if (chkpt) {
|
||||||
|
@ -128,7 +125,7 @@ __releases(&journal->j_state_lock)
|
||||||
} else if (jbd2_cleanup_journal_tail(journal) == 0) {
|
} else if (jbd2_cleanup_journal_tail(journal) == 0) {
|
||||||
/* We were able to recover space; yay! */
|
/* We were able to recover space; yay! */
|
||||||
;
|
;
|
||||||
} else if (has_transaction) {
|
} else if (tid) {
|
||||||
/*
|
/*
|
||||||
* jbd2_journal_commit_transaction() may want
|
* jbd2_journal_commit_transaction() may want
|
||||||
* to take the checkpoint_mutex if JBD2_FLUSHED
|
* to take the checkpoint_mutex if JBD2_FLUSHED
|
||||||
|
|
Loading…
Add table
Reference in a new issue