git: 3af3e99ce4a2 - main - devfs: stop using insmntque1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jan 2022 00:12:23 UTC
The branch main has been updated by mjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=3af3e99ce4a24c5d7ffbdaf12b22e91257dc198d
commit 3af3e99ce4a24c5d7ffbdaf12b22e91257dc198d
Author: Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-01-26 23:51:41 +0000
Commit: Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-01-26 23:54:30 +0000
devfs: stop using insmntque1
It adds nothing of value over insmntque.
---
sys/fs/devfs/devfs_vnops.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 594dc087aab3..dae4079c2c6c 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -508,11 +508,9 @@ devfs_allocv_drop_refs(int drop_dm_lock, struct devfs_mount *dmp,
}
static void
-devfs_insmntque_dtr(struct vnode *vp, void *arg)
+devfs_insmntque_dtr(struct vnode *vp, struct devfs_dirent *de)
{
- struct devfs_dirent *de;
- de = (struct devfs_dirent *)arg;
mtx_lock(&devfs_de_interlock);
vp->v_data = NULL;
de->de_vnode = NULL;
@@ -617,8 +615,9 @@ loop:
vp->v_data = de;
de->de_vnode = vp;
mtx_unlock(&devfs_de_interlock);
- error = insmntque1(vp, mp, devfs_insmntque_dtr, de);
+ error = insmntque(vp, mp);
if (error != 0) {
+ devfs_insmntque_dtr(vp, de);
(void) devfs_allocv_drop_refs(1, dmp, de);
return (error);
}
@@ -681,7 +680,7 @@ devfs_close(struct vop_close_args *ap)
/*
* XXX: Don't call d_close() if we were called because of
- * XXX: insmntque1() failure.
+ * XXX: insmntque() failure.
*/
if (vp->v_data == NULL)
return (0);