bcachefs: Fix validate_bset() repair path
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 8 Nov 2024 05:00:19 +0000 (00:00 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 8 Nov 2024 19:07:11 +0000 (14:07 -0500)
commitdc537189b5cf09e61839491fc6a465c5659d7dbd
treea3e28f037a9d26e7dd578a055656ada61e5f32e7
parentf8f1dde6868139f2294786365c56d7ff5cc3f4e7
bcachefs: Fix validate_bset() repair path

When we truncate a bset (due to it extending past the end of the btree
node), we can't skip the rest of the validation for e.g. the packed
format (if it's the first bset in the node).

Reported-by: syzbot+4d722d3c539d77c7bc82@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_io.c