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

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
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -249,7 +249,10 @@ int bch2_journal_replay(struct bch_fs *c)

		struct journal_key *k = *kp;

		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,
				BCH_TRANS_COMMIT_no_enospc|