File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -5301,8 +5301,9 @@ static void ext4_wait_for_tail_page_commit(struct inode *inode)
53015301 struct page * page ;
53025302 unsigned offset ;
53035303 journal_t * journal = EXT4_SB (inode -> i_sb )-> s_journal ;
5304- tid_t commit_tid = 0 ;
5304+ tid_t commit_tid ;
53055305 int ret ;
5306+ bool has_transaction ;
53065307
53075308 offset = inode -> i_size & (PAGE_SIZE - 1 );
53085309 /*
@@ -5327,12 +5328,14 @@ static void ext4_wait_for_tail_page_commit(struct inode *inode)
53275328 put_page (page );
53285329 if (ret != - EBUSY )
53295330 return ;
5330- commit_tid = 0 ;
5331+ has_transaction = false ;
53315332 read_lock (& journal -> j_state_lock );
5332- if (journal -> j_committing_transaction )
5333+ if (journal -> j_committing_transaction ) {
53335334 commit_tid = journal -> j_committing_transaction -> t_tid ;
5335+ has_transaction = true;
5336+ }
53345337 read_unlock (& journal -> j_state_lock );
5335- if (commit_tid )
5338+ if (has_transaction )
53365339 jbd2_log_wait_commit (journal , commit_tid );
53375340 }
53385341}
You can’t perform that action at this time.
0 commit comments