Commit 79055f50 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: make sure to release last journal pin in replay

This fixes a deadlock when journal replay has many keys to insert that
were from fsck, not the journal.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent fabb4d49
...@@ -249,7 +249,10 @@ int bch2_journal_replay(struct bch_fs *c) ...@@ -249,7 +249,10 @@ int bch2_journal_replay(struct bch_fs *c)
struct journal_key *k = *kp; struct journal_key *k = *kp;
replay_now_at(j, k->journal_seq); if (k->journal_seq)
replay_now_at(j, k->journal_seq);
else
replay_now_at(j, j->replay_journal_seq_end);
ret = commit_do(trans, NULL, NULL, ret = commit_do(trans, NULL, NULL,
BCH_TRANS_COMMIT_no_enospc| BCH_TRANS_COMMIT_no_enospc|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment