From f07313259fa422581b64b5b22d1de575d710df52 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 1 Mar 2024 20:28:00 -0500 Subject: kernel: vfs_mount: Allocate vnode per mountpoint Signed-off-by: Ian Moffett --- sys/kern/vfs_mount.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys') 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; -- cgit v1.2.3