From 9dcc5282d47f9d2d2ae661a2eccaeaed1c8a460b Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 18 Oct 2025 15:27:02 -0400 Subject: kern: vfs: Add vtype param to vop_create() Signed-off-by: Ian Moffett --- src/sys/include/os/vnode.h | 3 ++- src/sys/os/vfs_subr.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/sys') diff --git a/src/sys/include/os/vnode.h b/src/sys/include/os/vnode.h index 1fd164d..31cfb0c 100644 --- a/src/sys/include/os/vnode.h +++ b/src/sys/include/os/vnode.h @@ -206,11 +206,12 @@ int vop_reclaim(struct vnode *vp, int flags); * * @vp: Vnode of parent directory * @ndp: Namei descriptor of path component + * @type: Vnode type to create with * * Returns zero on success, otherwise a less than zero * value on failure. */ -int vop_create(struct vnode *vp, struct nameidata *ndp); +int vop_create(struct vnode *vp, struct nameidata *ndp, vtype_t type); /* * Get the attributes of a file diff --git a/src/sys/os/vfs_subr.c b/src/sys/os/vfs_subr.c index 2ae18af..0e8c605 100644 --- a/src/sys/os/vfs_subr.c +++ b/src/sys/os/vfs_subr.c @@ -226,7 +226,7 @@ vop_reclaim(struct vnode *vp, int flags) } int -vop_create(struct vnode *vp, struct nameidata *ndp) +vop_create(struct vnode *vp, struct nameidata *ndp, vtype_t type) { struct vop *vops; struct vop_create_args args; @@ -244,6 +244,7 @@ vop_create(struct vnode *vp, struct nameidata *ndp) } args.ndp = ndp; + args.vtype = type; return vops->create(&args); } -- cgit v1.2.3