diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-04 21:57:11 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:27 -0400 |
commit | 4eea53de8a1882e75d3640dce06c8c2874a77b05 (patch) | |
tree | 0b0a8bef6fb0fbcc646d58f53313e9851eeed2df /fs/bcachefs/fs.c | |
parent | 102a6a8f69b06df0e6594af4932ef47804f645c6 (diff) | |
download | lwn-4eea53de8a1882e75d3640dce06c8c2874a77b05.tar.gz lwn-4eea53de8a1882e75d3640dce06c8c2874a77b05.zip |
bcachefs: Fix transaction path overflow in fiemap
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r-- | fs/bcachefs/fs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 2aaeee585157..310e317738b9 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -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; |