devfs: stop using insmntque1

It adds nothing of value over insmntque.
This commit is contained in:
Mateusz Guzik
2022-01-27 00:51:41 +01:00
parent 2c449a4c5a
commit 3af3e99ce4
+4 -5
View File
@@ -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 @@ devfs_allocv(struct devfs_dirent *de, struct mount *mp, int lockmode,
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);