svn commit: r225039 - stable/7/sys/fs/devfs

Jaakko Heinonen jh at FreeBSD.org
Sat Aug 20 15:21:03 UTC 2011


Author: jh
Date: Sat Aug 20 15:21:02 2011
New Revision: 225039
URL: http://svn.freebsd.org/changeset/base/225039

Log:
  MFC r208717:
  
  Don't try to call cdevsw d_close() method when devfs_close() is called
  because of insmntque1() failure.

Modified:
  stable/7/sys/fs/devfs/devfs_vnops.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- stable/7/sys/fs/devfs/devfs_vnops.c	Sat Aug 20 15:12:53 2011	(r225038)
+++ stable/7/sys/fs/devfs/devfs_vnops.c	Sat Aug 20 15:21:02 2011	(r225039)
@@ -396,6 +396,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


More information about the svn-src-stable-7 mailing list