git: 5ccdfdabc813 - main - tmpfs: stop using insmntque1

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

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

commit 5ccdfdabc813d9f97df54c3d5de6951c9ec5ff98
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-01-26 23:56:12 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-01-26 23:56:12 +0000

    tmpfs: stop using insmntque1
    
    It adds nothing of value over insmntque.
---
 sys/fs/tmpfs/tmpfs_subr.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index ca530fd72fdb..234984b47c59 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -826,7 +826,7 @@ tmpfs_destroy_vobject(struct vnode *vp, vm_object_t obj)
  * Need to clear v_object for insmntque failure.
  */
 static void
-tmpfs_insmntque_dtr(struct vnode *vp, void *dtr_arg)
+tmpfs_insmntque_dtr(struct vnode *vp)
 {
 
 	tmpfs_destroy_vobject(vp, vp->v_object);
@@ -983,9 +983,11 @@ loop:
 	if (vp->v_type != VFIFO)
 		VN_LOCK_ASHARE(vp);
 
-	error = insmntque1(vp, mp, tmpfs_insmntque_dtr, NULL);
-	if (error != 0)
+	error = insmntque(vp, mp);
+	if (error != 0) {
+		tmpfs_insmntque_dtr(vp);
 		vp = NULL;
+	}
 
 unlock:
 	TMPFS_NODE_LOCK(node);