diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-01 13:26:53 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-01 13:26:53 -0500 |
commit | 22bdfe6ed296a8a9d95e9d88a856bad8f1c870b7 (patch) | |
tree | 0cd366ee14170a010e26d58b4cf54c58ea9ffbbe /sys/kern/vfs_subr.c | |
parent | a31024156aebcc2f58d849970efcce50ede58c1c (diff) |
kernel: vfs: Simplify mounting logic
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 6646f79..ac8a16b 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -158,39 +158,3 @@ vfs_alloc_vnode(struct vnode **vnode, struct mount *mp, int type) *vnode = new_vnode; return 0; } - -/* - * This function mounts a `mount' structure - * at a specific path. - * - * @mp_out: Where to store copy of new mountpoint (NULL if none) - * @path: Path to mount on. - * @mnt_flags: Mount flags (MNT_* from sys/mount.h) - * - * Returns 0 upon success, otherwise a < 0 value. - * - * XXX: This function assumes the mountpoint has its mount - * routine set in its vfsops. - */ -int -vfs_mount(struct mount **mp_out, const char *path, int mnt_flags) -{ - struct mount *mp; - int cache_status; - - mp = dynalloc(sizeof(struct mount)); - if (mp == NULL) { - return -ENOMEM; - } - - mp->flags = mnt_flags; - cache_status = vfs_cache_mp(mp, path); - - if (cache_status != 0) { - dynfree(mp); - return cache_status; - } - - *mp_out = mp; - return 0; -} |