Commit 082f0801 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix error handling in bch2_fs_recovery()

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent dc3b63dc
......@@ -271,11 +271,13 @@ int bch2_fs_recovery(struct bch_fs *c)
continue;
err = "invalid btree root pointer";
ret = -1;
if (r->error)
goto err;
err = "error reading btree root";
if (bch2_btree_root_read(c, i, &r->key, r->level)) {
ret = bch2_btree_root_read(c, i, &r->key, r->level);
if (ret) {
if (i != BTREE_ID_ALLOC)
goto err;
......
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