mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
bcachefs: Add missing bch2_btree_node_iter_fix() calls
With multiple iterators, if another iterator points to the key being modified, we need to call bch2_btree_node_iter_fix() to re-unpack the key into the iter->k Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
9b02d1c49a
commit
4cac0bf2c2
@ -1138,6 +1138,8 @@ extent_squash(struct bch_fs *c, struct btree_iter *iter,
|
||||
__bch2_cut_front(insert->k.p, k);
|
||||
BUG_ON(bkey_deleted(k.k));
|
||||
extent_save(l->b, _k, k.k);
|
||||
bch2_btree_node_iter_fix(iter, l->b, &l->iter,
|
||||
_k, _k->u64s, _k->u64s);
|
||||
verify_modified_extent(iter, _k);
|
||||
break;
|
||||
|
||||
@ -1207,6 +1209,8 @@ extent_squash(struct bch_fs *c, struct btree_iter *iter,
|
||||
__bch2_cut_front(insert->k.p, k);
|
||||
BUG_ON(bkey_deleted(k.k));
|
||||
extent_save(l->b, _k, k.k);
|
||||
bch2_btree_node_iter_fix(iter, l->b, &l->iter,
|
||||
_k, _k->u64s, _k->u64s);
|
||||
verify_modified_extent(iter, _k);
|
||||
|
||||
extent_bset_insert(c, iter, &split.k);
|
||||
|
Loading…
Reference in New Issue
Block a user