bcachefs: Fix count_iters_for_insert()
This fixes a transaction iterator overflow. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
8666a9ad6f
commit
fa4dc3987b
@ -44,6 +44,10 @@ static int count_iters_for_insert(struct btree_trans *trans,
|
||||
* extent we're inserting and overwriting:
|
||||
*/
|
||||
*nr_iters += 1;
|
||||
if (*nr_iters >= max_iters) {
|
||||
*end = bpos_min(*end, k.k->p);
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
switch (k.k->type) {
|
||||
case KEY_TYPE_extent:
|
||||
|
Loading…
Reference in New Issue
Block a user