summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/devfs')
-rw-r--r--sys/fs/devfs/devfs_vnops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 4c059cd..88937a6 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -459,6 +459,13 @@ devfs_close(struct vop_close_args *ap)
int vp_locked, error;
/*
+ * XXX: Don't call d_close() if we were called because of
+ * XXX: insmntque1() failure.
+ */
+ if (vp->v_data == NULL)
+ return (0);
+
+ /*
* Hack: a tty device that is a controlling terminal
* has a reference from the session structure.
* We cannot easily tell that a character device is
OpenPOWER on IntegriCloud