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)
501501 }
502502 spin_unlock (& commit_transaction -> t_handle_lock );
503503 commit_transaction -> t_state = T_SWITCH ;
504- write_unlock (& journal -> j_state_lock );
505504
506505 J_ASSERT (atomic_read (& commit_transaction -> t_outstanding_credits ) <=
507506 journal -> j_max_transaction_buffers );
@@ -521,6 +520,8 @@ void jbd2_journal_commit_transaction(journal_t *journal)
521520 * has reserved. This is consistent with the existing behaviour
522521 * that multiple jbd2_journal_get_write_access() calls to the same
523522 * 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().
524525 */
525526 while (commit_transaction -> t_reserved_list ) {
526527 jh = commit_transaction -> t_reserved_list ;
@@ -540,6 +541,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
540541 jbd2_journal_refile_buffer (journal , jh );
541542 }
542543
544+ write_unlock (& journal -> j_state_lock );
543545 /*
544546 * Now try to drop any written-back buffers from the journal's
545547 * checkpoint lists. We do this *before* commit because it potentially
You can’t perform that action at this time.
0 commit comments