diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-15 23:53:12 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-16 19:14:01 -0400 |
commit | 79055f50a65fe5eb58e9da1f79fb0a4f4bc82fff (patch) | |
tree | 33f6f46429d149d22a31aae4c33b9f5c64d92f70 /fs/bcachefs/recovery.c | |
parent | fabb4d49854281027454b0fa305d33f6c9ec4b47 (diff) |
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: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r-- | fs/bcachefs/recovery.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 0f328aba9760..be5b47619327 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -249,7 +249,10 @@ int bch2_journal_replay(struct bch_fs *c) 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, BCH_TRANS_COMMIT_no_enospc| |