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 @@ -488,7 +488,6 @@ void jbd2_journal_commit_transaction(journal_t *journal)
488
488
jbd2_journal_wait_updates (journal );
489
489
490
490
commit_transaction -> t_state = T_SWITCH ;
491
- write_unlock (& journal -> j_state_lock );
492
491
493
492
J_ASSERT (atomic_read (& commit_transaction -> t_outstanding_credits ) <=
494
493
journal -> j_max_transaction_buffers );
@@ -508,6 +507,8 @@ void jbd2_journal_commit_transaction(journal_t *journal)
508
507
* has reserved. This is consistent with the existing behaviour
509
508
* that multiple jbd2_journal_get_write_access() calls to the same
510
509
* buffer are perfectly permissible.
510
+ * We use journal->j_state_lock here to serialize processing of
511
+ * t_reserved_list with eviction of buffers from journal_unmap_buffer().
511
512
*/
512
513
while (commit_transaction -> t_reserved_list ) {
513
514
jh = commit_transaction -> t_reserved_list ;
@@ -527,6 +528,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
527
528
jbd2_journal_refile_buffer (journal , jh );
528
529
}
529
530
531
+ write_unlock (& journal -> j_state_lock );
530
532
/*
531
533
* Now try to drop any written-back buffers from the journal's
532
534
* checkpoint lists. We do this *before* commit because it potentially
You can’t perform that action at this time.
0 commit comments