From owner-svn-src-head@FreeBSD.ORG Tue Jun 1 18:57:21 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68B16106564A; Tue, 1 Jun 2010 18:57:21 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 573DA8FC08; Tue, 1 Jun 2010 18:57:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o51IvL6n016771; Tue, 1 Jun 2010 18:57:21 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o51IvLrv016769; Tue, 1 Jun 2010 18:57:21 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201006011857.o51IvLrv016769@svn.freebsd.org> From: Jaakko Heinonen Date: Tue, 1 Jun 2010 18:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208717 - head/sys/fs/devfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 18:57:21 -0000 Author: jh Date: Tue Jun 1 18:57:21 2010 New Revision: 208717 URL: http://svn.freebsd.org/changeset/base/208717 Log: Don't try to call cdevsw d_close() method when devfs_close() is called because of insmntque1() failure. Found with: stress2 Suggested and reviewed by: kib Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Tue Jun 1 18:27:48 2010 (r208716) +++ head/sys/fs/devfs/devfs_vnops.c Tue Jun 1 18:57:21 2010 (r208717) @@ -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