Revert "ext4: fix incorrect tid assumption in ext4_wait_for_tail_page_commit()"
This reverts commit 4af33d15cb
.
This commit is contained in:
parent
5840e6db2a
commit
3b0ddcb83c
1 changed files with 4 additions and 7 deletions
|
@ -5399,9 +5399,8 @@ static void ext4_wait_for_tail_page_commit(struct inode *inode)
|
|||
struct page *page;
|
||||
unsigned offset;
|
||||
journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
|
||||
tid_t commit_tid;
|
||||
tid_t commit_tid = 0;
|
||||
int ret;
|
||||
bool has_transaction;
|
||||
|
||||
offset = inode->i_size & (PAGE_SIZE - 1);
|
||||
/*
|
||||
|
@ -5426,14 +5425,12 @@ static void ext4_wait_for_tail_page_commit(struct inode *inode)
|
|||
put_page(page);
|
||||
if (ret != -EBUSY)
|
||||
return;
|
||||
has_transaction = false;
|
||||
commit_tid = 0;
|
||||
read_lock(&journal->j_state_lock);
|
||||
if (journal->j_committing_transaction) {
|
||||
if (journal->j_committing_transaction)
|
||||
commit_tid = journal->j_committing_transaction->t_tid;
|
||||
has_transaction = true;
|
||||
}
|
||||
read_unlock(&journal->j_state_lock);
|
||||
if (has_transaction)
|
||||
if (commit_tid)
|
||||
jbd2_log_wait_commit(journal, commit_tid);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue