bcachefs: Add missing guard in bch2_snapshot_has_children()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 19 May 2024 23:16:22 +0000 (19:16 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 20 May 2024 09:37:26 +0000 (05:37 -0400)
commit6d48e61364aedd774d688f28b5a6c9b5f7f0018c
treef9d4d55e80bbaf89f5600be8a64bfaac429c3beb
parent6ce26ad376bdc65c2bc6d4ef7b8a939bf1bd19dc
bcachefs: Add missing guard in bch2_snapshot_has_children()

We additionally need to be going inconsistent if passed an invalid
snapshot ID; that patch will need more thorough testing.

Reported-by: syzbot+1c9fca23fe478633b305@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/snapshot.h