mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
bcachefs: bch2_btree_iter_traverse() shouldn't normally call traverse_all()
If there's more than one iterator in the btree_trans, it's requried to call bch2_trans_begin() to handle transaction restarts. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
e5af273fce
commit
b4e09b351b
@ -1476,8 +1476,10 @@ static int __must_check __bch2_btree_iter_traverse(struct btree_iter *iter)
|
||||
|
||||
ret = bch2_trans_cond_resched(trans) ?:
|
||||
btree_iter_traverse_one(iter, _RET_IP_);
|
||||
if (unlikely(ret))
|
||||
if (unlikely(ret) && hweight64(trans->iters_linked) == 1) {
|
||||
ret = __btree_iter_traverse_all(trans, ret, _RET_IP_);
|
||||
BUG_ON(ret == -EINTR);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user