git: ade1367ba8e4 - main - fdescfs: stop using insmntque1

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Thu, 27 Jan 2022 00:12:24 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=ade1367ba8e49db5417889cbd8de15e5e05d0ac8

commit ade1367ba8e49db5417889cbd8de15e5e05d0ac8
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-01-26 23:52:16 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-01-26 23:54:38 +0000

    fdescfs: stop using insmntque1
    
    It adds nothing of value over insmntque.
---
 sys/fs/fdescfs/fdesc_vnops.c | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index d8dab3d7598c..0f6111586a38 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -93,7 +93,6 @@ static struct vop_vector fdesc_vnodeops = {
 };
 VFS_VOP_VECTOR_REGISTER(fdesc_vnodeops);
 
-static void fdesc_insmntque_dtr(struct vnode *, void *);
 static void fdesc_remove_entry(struct fdescnode *);
 
 /*
@@ -120,17 +119,6 @@ fdesc_uninit(struct vfsconf *vfsp)
 	return (0);
 }
 
-/*
- * If allocating vnode fails, call this.
- */
-static void
-fdesc_insmntque_dtr(struct vnode *vp, void *arg)
-{
-
-	vgone(vp);
-	vput(vp);
-}
-
 /*
  * Remove an entry from the hash if it exists.
  */
@@ -203,8 +191,10 @@ loop:
 	fd->fd_ix = ix;
 	if (ftype == Fdesc && fmp->flags & FMNT_LINRDLNKF)
 		vp->v_vflag |= VV_READLINK;
-	error = insmntque1(vp, mp, fdesc_insmntque_dtr, NULL);
+	error = insmntque(vp, mp);
 	if (error != 0) {
+		vgone(vp);
+		vput(vp);
 		*vpp = NULLVP;
 		return (error);
 	}