File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -501,7 +501,6 @@ void jbd2_journal_commit_transaction(journal_t *journal)
501
501
}
502
502
spin_unlock (& commit_transaction -> t_handle_lock );
503
503
commit_transaction -> t_state = T_SWITCH ;
504
- write_unlock (& journal -> j_state_lock );
505
504
506
505
J_ASSERT (atomic_read (& commit_transaction -> t_outstanding_credits ) <=
507
506
journal -> j_max_transaction_buffers );
@@ -521,6 +520,8 @@ void jbd2_journal_commit_transaction(journal_t *journal)
521
520
* has reserved. This is consistent with the existing behaviour
522
521
* that multiple jbd2_journal_get_write_access() calls to the same
523
522
* buffer are perfectly permissible.
523
+ * We use journal->j_state_lock here to serialize processing of
524
+ * t_reserved_list with eviction of buffers from journal_unmap_buffer().
524
525
*/
525
526
while (commit_transaction -> t_reserved_list ) {
526
527
jh = commit_transaction -> t_reserved_list ;
@@ -540,6 +541,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
540
541
jbd2_journal_refile_buffer (journal , jh );
541
542
}
542
543
544
+ write_unlock (& journal -> j_state_lock );
543
545
/*
544
546
* Now try to drop any written-back buffers from the journal's
545
547
* checkpoint lists. We do this *before* commit because it potentially
You can’t perform that action at this time.
0 commit comments