summaryrefslogtreecommitdiff
path: root/libbcachefs/disk_groups.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/disk_groups.c')
-rw-r--r--libbcachefs/disk_groups.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbcachefs/disk_groups.c b/libbcachefs/disk_groups.c
index cd200cbe..87f3940e 100644
--- a/libbcachefs/disk_groups.c
+++ b/libbcachefs/disk_groups.c
@@ -176,6 +176,8 @@ const struct bch_devs_mask *bch2_target_to_mask(struct bch_fs *c, unsigned targe
struct target t = target_decode(target);
switch (t.type) {
+ case TARGET_NULL:
+ return NULL;
case TARGET_DEV: {
struct bch_dev *ca = t.dev < c->sb.nr_devices
? rcu_dereference(c->devs[t.dev])