aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/virtio/p9fs/virtio_p9fs.c3
-rw-r--r--sys/fs/p9fs/p9fs_vfsops.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/virtio/p9fs/virtio_p9fs.c b/sys/dev/virtio/p9fs/virtio_p9fs.c
index f76b135c042d..19a32fea458e 100644
--- a/sys/dev/virtio/p9fs/virtio_p9fs.c
+++ b/sys/dev/virtio/p9fs/virtio_p9fs.c
@@ -471,14 +471,12 @@ vt9p_modevent(module_t mod, int type, void *unused)
switch (type) {
case MOD_LOAD:
if (loaded++ == 0) {
- p9_init_zones();
p9_register_trans(&vt9p_trans);
}
break;
case MOD_UNLOAD:
if (--loaded == 0) {
p9_unregister_trans(&vt9p_trans);
- p9_destroy_zones();
}
break;
case MOD_SHUTDOWN:
@@ -487,6 +485,7 @@ vt9p_modevent(module_t mod, int type, void *unused)
error = EOPNOTSUPP;
break;
}
+
return (error);
}
diff --git a/sys/fs/p9fs/p9fs_vfsops.c b/sys/fs/p9fs/p9fs_vfsops.c
index 0e09c58e57b6..a0f0a5a4e494 100644
--- a/sys/fs/p9fs/p9fs_vfsops.c
+++ b/sys/fs/p9fs/p9fs_vfsops.c
@@ -119,6 +119,8 @@ p9fs_init(struct vfsconf *vfsp)
p9fs_io_buffer_zone = uma_zcreate("p9fs io_buffer zone",
P9FS_MTU, NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
+ p9_init_zones();
+
return (0);
}
@@ -127,6 +129,8 @@ static int
p9fs_uninit(struct vfsconf *vfsp)
{
+ p9_destroy_zones();
+
uma_zdestroy(p9fs_node_zone);
uma_zdestroy(p9fs_io_buffer_zone);
uma_zdestroy(p9fs_getattr_zone);