mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 02:36:02 +00:00
bcachefs: Fix another iterator counting bug
We were marking the end of where we could insert incorrectly for indirect extents. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
d3baf289dc
commit
0d0e77f45f
@ -76,7 +76,8 @@ static int count_iters_for_insert(struct btree_trans *trans,
|
||||
|
||||
if (*nr_iters >= max_iters) {
|
||||
struct bpos pos = bkey_start_pos(k.k);
|
||||
pos.offset += r_k.k->p.offset - idx;
|
||||
pos.offset += min_t(u64, k.k->size,
|
||||
r_k.k->p.offset - idx);
|
||||
|
||||
*end = bpos_min(*end, pos);
|
||||
ret = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user