bcachefs: Fix transaction path overflow in fiemap

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2022-03-04 21:57:11 -05:00 committed by Kent Overstreet
parent 102a6a8f69
commit 4eea53de8a

View File

@ -935,7 +935,8 @@ retry:
bch2_trans_iter_init(&trans, &iter, BTREE_ID_extents,
SPOS(ei->v.i_ino, start, snapshot), 0);
while ((k = bch2_btree_iter_peek(&iter)).k &&
while (!(ret = btree_trans_too_many_iters(&trans)) &&
(k = bch2_btree_iter_peek(&iter)).k &&
!(ret = bkey_err(k)) &&
bkey_cmp(iter.pos, end) < 0) {
enum btree_id data_btree = BTREE_ID_extents;