aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zvol.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/zvol.c')
-rw-r--r--module/zfs/zvol.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
index 623fb9b22..254760220 100644
--- a/module/zfs/zvol.c
+++ b/module/zfs/zvol.c
@@ -1603,6 +1603,9 @@ zvol_alloc(dev_t dev, const char *name)
if (volmode == ZFS_VOLMODE_DEFAULT)
volmode = zvol_volmode;
+ if (volmode == ZFS_VOLMODE_NONE)
+ return (NULL);
+
zv = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP);
list_link_init(&zv->zv_next);