bcachefs: Guard against unknown k.k->type in __bkey_invalid()
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 6 May 2024 02:33:05 +0000 (22:33 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 6 May 2024 14:58:17 +0000 (10:58 -0400)
commit2bb9600d5d4735953c47dd1ee99382c68dd04caa
tree185e6bf1d4141830cf0a3f24da40f027af617c3e
parentf39055220f6f98a180e3503fe05bbf9921c425c8
bcachefs: Guard against unknown k.k->type in __bkey_invalid()

For forwards compatibility we have to allow unknown key types, and only
run the checks that make sense against them.

Fix a missing guard on k.k->type being known.

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