From: Alan Huang Date: Sat, 12 Apr 2025 10:20:49 +0000 (+0800) Subject: bcachefs: Add missing error handling X-Git-Tag: v6.15-rc3~30^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=806776ad9c20c6589f957212ef017e75760a08cd;p=thirdparty%2Flinux.git bcachefs: Add missing error handling Reported-by: syzbot+d10151bf01574a09a915@syzkaller.appspotmail.com Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index d2b07f602da95..606d684e6f23f 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);