]> www.infradead.org Git - users/dwmw2/linux.git/commit
bcachefs: Fix btree_iter_peek_prev() at end of inode
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 22 Apr 2025 08:54:54 +0000 (04:54 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 24 Apr 2025 23:09:52 +0000 (19:09 -0400)
commit353739f1d1675692d9de01483c75c15b314710ac
tree2ead171220301bb2dd57d96f51323fe1e5dfaa9f
parentc4f89a1d3590243ef1bbd55557a1f55a4a93927d
bcachefs: Fix btree_iter_peek_prev() at end of inode

At the end of the inode, on an extents iterator, peek_slot() has to
advance to the next position to avoid returning a 0 size extent, which
is not allowed.

Changing iter->pos confuses peek_prev(), but we don't need to call
peek_slot() in this case.

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