summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/vfs_mount.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 3b1fcc5..3efd7a7 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -91,6 +91,12 @@ vfs_mount(const char *path, int mntflags)
}
mp->phash = hash;
+ status = vfs_alloc_vnode(&mp->vnode, mp, VDIR);
+
+ if (status != 0) {
+ return status;
+ }
+
entry = &mountlist[hash % MOUNTLIST_SIZE];
TAILQ_INSERT_TAIL(&entry->buckets, mp, link);
return 0;