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 @@ -91,17 +91,20 @@ __releases(&journal->j_state_lock)
91
91
if (space_left < nblocks ) {
92
92
int chkpt = journal -> j_checkpoint_transactions != NULL ;
93
93
tid_t tid = 0 ;
94
+ bool has_transaction = false;
94
95
95
- if (journal -> j_committing_transaction )
96
+ if (journal -> j_committing_transaction ) {
96
97
tid = journal -> j_committing_transaction -> t_tid ;
98
+ has_transaction = true;
99
+ }
97
100
spin_unlock (& journal -> j_list_lock );
98
101
write_unlock (& journal -> j_state_lock );
99
102
if (chkpt ) {
100
103
jbd2_log_do_checkpoint (journal );
101
104
} else if (jbd2_cleanup_journal_tail (journal ) == 0 ) {
102
105
/* We were able to recover space; yay! */
103
106
;
104
- } else if (tid ) {
107
+ } else if (has_transaction ) {
105
108
/*
106
109
* jbd2_journal_commit_transaction() may want
107
110
* to take the checkpoint_mutex if JBD2_FLUSHED
You can’t perform that action at this time.
0 commit comments