aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/vdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/vdev.c')
-rw-r--r--module/zfs/vdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index 64016311b..ad4f3efb8 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -2527,7 +2527,7 @@ vdev_hold(vdev_t *vd)
for (int c = 0; c < vd->vdev_children; c++)
vdev_hold(vd->vdev_child[c]);
- if (vd->vdev_ops->vdev_op_leaf)
+ if (vd->vdev_ops->vdev_op_leaf && vd->vdev_ops->vdev_op_hold != NULL)
vd->vdev_ops->vdev_op_hold(vd);
}
@@ -2538,7 +2538,7 @@ vdev_rele(vdev_t *vd)
for (int c = 0; c < vd->vdev_children; c++)
vdev_rele(vd->vdev_child[c]);
- if (vd->vdev_ops->vdev_op_leaf)
+ if (vd->vdev_ops->vdev_op_leaf && vd->vdev_ops->vdev_op_rele != NULL)
vd->vdev_ops->vdev_op_rele(vd);
}