summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Huang <mmpgouride@gmail.com>2025-04-12 18:20:49 +0800
committerKent Overstreet <kent.overstreet@linux.dev>2025-04-13 07:56:28 -0400
commit806776ad9c20c6589f957212ef017e75760a08cd (patch)
treec1a06748223f6d552b222fb6f8a71b20f83c5d6c
parentd62922ba3cfc01dc42e853f90b93c525751e9383 (diff)
bcachefs: Add missing error handling
Reported-by: syzbot+d10151bf01574a09a915@syzkaller.appspotmail.com Signed-off-by: Alan Huang <mmpgouride@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/recovery.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index d2b07f602da9..606d684e6f23 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -1125,7 +1125,10 @@ int bch2_fs_initialize(struct bch_fs *c)
* journal_res_get() will crash if called before this has
* set up the journal.pin FIFO and journal.cur pointer:
*/
- bch2_fs_journal_start(&c->journal, 1);
+ ret = bch2_fs_journal_start(&c->journal, 1);
+ if (ret)
+ goto err;
+
set_bit(BCH_FS_accounting_replay_done, &c->flags);
bch2_journal_set_replay_done(&c->journal);