summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-01 20:28:00 -0500
committerIan Moffett <ian@osmora.org>2024-03-01 20:28:00 -0500
commitf07313259fa422581b64b5b22d1de575d710df52 (patch)
tree06173c65192d3d3d44113665c344eef3d68c65a4 /sys
parentec28488329d766a939a28292ffff22fac3963736 (diff)
kernel: vfs_mount: Allocate vnode per mountpoint
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-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;