mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 04:19:23 -04:00
bcachefs: Fix an error path
It's possible to get -EIO in __btree_iter_traverse_all() after looping, with orig_iter NULL. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
committed by
Kent Overstreet
parent
8de819f834
commit
ab9ff73322
@@ -1010,8 +1010,11 @@ static int __btree_iter_traverse_all(struct btree_trans *trans,
|
||||
|
||||
if (unlikely(ret == -EIO)) {
|
||||
trans->error = true;
|
||||
orig_iter->flags |= BTREE_ITER_ERROR;
|
||||
orig_iter->l[orig_iter->level].b = BTREE_ITER_NO_NODE_ERROR;
|
||||
if (orig_iter) {
|
||||
orig_iter->flags |= BTREE_ITER_ERROR;
|
||||
orig_iter->l[orig_iter->level].b =
|
||||
BTREE_ITER_NO_NODE_ERROR;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user