]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: Fix range in bch2_lookup_indirect_extent() error path
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 20 Jun 2025 03:06:01 +0000 (23:06 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Jun 2025 04:29:03 +0000 (00:29 -0400)
commit72c0d9cb0fc48b6d382c3b5b6f702108a612cfdb
tree50577d1142fea3feb2a4e3497de3469f9ca94951
parentabcb6bd4be19d935795611c022d7d19ab69363b0
bcachefs: Fix range in bch2_lookup_indirect_extent() error path

Before calling bch2_indirect_extent_missing_error(), we have to
calculate the missing range, which is the intersection of the reflink
pointer and the non-indirect-extent we found.

The calculation didn't take into account that the returned extent may
span the iter position, leading to an infinite loop when we
(unnecessarily) resized the extent we were returning to one that didn't
extend past the offset we were looking up.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/reflink.c