File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -115,17 +115,20 @@ __releases(&journal->j_state_lock)
115
115
if (space_left < nblocks ) {
116
116
int chkpt = journal -> j_checkpoint_transactions != NULL ;
117
117
tid_t tid = 0 ;
118
+ bool has_transaction = false;
118
119
119
- if (journal -> j_committing_transaction )
120
+ if (journal -> j_committing_transaction ) {
120
121
tid = journal -> j_committing_transaction -> t_tid ;
122
+ has_transaction = true;
123
+ }
121
124
spin_unlock (& journal -> j_list_lock );
122
125
write_unlock (& journal -> j_state_lock );
123
126
if (chkpt ) {
124
127
jbd2_log_do_checkpoint (journal );
125
128
} else if (jbd2_cleanup_journal_tail (journal ) == 0 ) {
126
129
/* We were able to recover space; yay! */
127
130
;
128
- } else if (tid ) {
131
+ } else if (has_transaction ) {
129
132
/*
130
133
* jbd2_journal_commit_transaction() may want
131
134
* to take the checkpoint_mutex if JBD2_FLUSHED
You can’t perform that action at this time.
0 commit comments