File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -451,7 +451,6 @@ void jbd2_journal_commit_transaction(journal_t *journal)
451
451
}
452
452
spin_unlock (& commit_transaction -> t_handle_lock );
453
453
commit_transaction -> t_state = T_SWITCH ;
454
- write_unlock (& journal -> j_state_lock );
455
454
456
455
J_ASSERT (atomic_read (& commit_transaction -> t_outstanding_credits ) <=
457
456
journal -> j_max_transaction_buffers );
@@ -471,6 +470,8 @@ void jbd2_journal_commit_transaction(journal_t *journal)
471
470
* has reserved. This is consistent with the existing behaviour
472
471
* that multiple jbd2_journal_get_write_access() calls to the same
473
472
* buffer are perfectly permissible.
473
+ * We use journal->j_state_lock here to serialize processing of
474
+ * t_reserved_list with eviction of buffers from journal_unmap_buffer().
474
475
*/
475
476
while (commit_transaction -> t_reserved_list ) {
476
477
jh = commit_transaction -> t_reserved_list ;
@@ -490,6 +491,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
490
491
jbd2_journal_refile_buffer (journal , jh );
491
492
}
492
493
494
+ write_unlock (& journal -> j_state_lock );
493
495
/*
494
496
* Now try to drop any written-back buffers from the journal's
495
497
* checkpoint lists. We do this *before* commit because it potentially
You can’t perform that action at this time.
0 commit comments