bcachefs: Fix a couple null ptr derefs when no disk groups exist
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 6 Aug 2020 19:22:24 +0000 (15:22 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:43 +0000 (17:08 -0400)
commit2d8c0da1a7c2601b21d3fb63b8cb4f3610cac196
treeaf1f5851a48dea35124b73f51ace8501fb026026
parent01566db2fb1fca313d75b8b849ee95bb9ec5bcd7
bcachefs: Fix a couple null ptr derefs when no disk groups exist

Normally successfully parsing a target means disk groups should exist,
but we don't want a BUG() or null ptr deref if we end up with an invalid
target.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/disk_groups.c
fs/bcachefs/io.c