mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
bcachefs: Fix bch2_bkey_narrow_crcs()
We have to reinitialize ptrs whenever we do something that changes them. Regression from when the code was converted to be generic across all keys with pointers. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
e42951b0aa
commit
f698a95797
1 changed files with 2 additions and 0 deletions
|
@ -454,6 +454,8 @@ bool bch2_bkey_narrow_crcs(struct bkey_i *k, struct bch_extent_crc_unpacked n)
|
|||
BUG_ON(n.live_size != k->k.size);
|
||||
|
||||
restart_narrow_pointers:
|
||||
ptrs = bch2_bkey_ptrs(bkey_i_to_s(k));
|
||||
|
||||
bkey_for_each_ptr_decode(&k->k, ptrs, p, i)
|
||||
if (can_narrow_crc(p.crc, n)) {
|
||||
bch2_bkey_drop_ptr(bkey_i_to_s(k), &i->ptr);
|
||||
|
|
Loading…
Reference in a new issue