Commit 37dd7834 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix an error path in bch2_btree_iter_traverse()

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 6e738539
...@@ -959,9 +959,10 @@ static void btree_iter_up(struct btree_iter *iter) ...@@ -959,9 +959,10 @@ static void btree_iter_up(struct btree_iter *iter)
int __must_check __bch2_btree_iter_traverse(struct btree_iter *); int __must_check __bch2_btree_iter_traverse(struct btree_iter *);
static int __btree_iter_traverse_all(struct btree_trans *trans, static int __btree_iter_traverse_all(struct btree_trans *trans,
struct btree_iter *iter, int ret) struct btree_iter *orig_iter, int ret)
{ {
struct bch_fs *c = trans->c; struct bch_fs *c = trans->c;
struct btree_iter *iter;
u8 sorted[BTREE_ITER_MAX]; u8 sorted[BTREE_ITER_MAX];
unsigned i, nr_sorted = 0; unsigned i, nr_sorted = 0;
...@@ -990,8 +991,8 @@ static int __btree_iter_traverse_all(struct btree_trans *trans, ...@@ -990,8 +991,8 @@ static int __btree_iter_traverse_all(struct btree_trans *trans,
if (unlikely(ret == -EIO)) { if (unlikely(ret == -EIO)) {
trans->error = true; trans->error = true;
iter->flags |= BTREE_ITER_ERROR; orig_iter->flags |= BTREE_ITER_ERROR;
iter->l[iter->level].b = BTREE_ITER_NO_NODE_ERROR; orig_iter->l[orig_iter->level].b = BTREE_ITER_NO_NODE_ERROR;
goto out; goto out;
} }
......
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