From owner-svn-src-stable@FreeBSD.ORG Fri Mar 6 09:22:07 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5ADEB174; Fri, 6 Mar 2015 09:22:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C359A94; Fri, 6 Mar 2015 09:22:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t269M7F2027803; Fri, 6 Mar 2015 09:22:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t269M6x3027800; Fri, 6 Mar 2015 09:22:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503060922.t269M6x3027800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Mar 2015 09:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r279685 - in stable/10/sys: fs/devfs kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 09:22:07 -0000 Author: kib Date: Fri Mar 6 09:22:05 2015 New Revision: 279685 URL: https://svnweb.freebsd.org/changeset/base/279685 Log: MFC r279362: The VNASSERT in vflush() FORCECLOSE case is trying to panic early to prevent errors from yanking devices out from under filesystems. Only care about special vnodes on devfs, special nodes on other kinds of filesystems do not have special properties. Modified: stable/10/sys/fs/devfs/devfs_vnops.c stable/10/sys/kern/vfs_subr.c stable/10/sys/sys/vnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_vnops.c Fri Mar 6 05:50:39 2015 (r279684) +++ stable/10/sys/fs/devfs/devfs_vnops.c Fri Mar 6 09:22:05 2015 (r279685) @@ -63,7 +63,6 @@ #include static struct vop_vector devfs_vnodeops; -static struct vop_vector devfs_specops; static struct fileops devfs_ops_f; #include @@ -1737,7 +1736,7 @@ static struct vop_vector devfs_vnodeops .vop_vptocnp = devfs_vptocnp, }; -static struct vop_vector devfs_specops = { +struct vop_vector devfs_specops = { .vop_default = &default_vnodeops, .vop_access = devfs_access, Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Fri Mar 6 05:50:39 2015 (r279684) +++ stable/10/sys/kern/vfs_subr.c Fri Mar 6 09:22:05 2015 (r279685) @@ -2624,6 +2624,7 @@ loop: */ if (vp->v_usecount == 0 || (flags & FORCECLOSE)) { VNASSERT(vp->v_usecount == 0 || + vp->v_op != &devfs_specops || (vp->v_type != VCHR && vp->v_type != VBLK), vp, ("device VNODE %p is FORCECLOSED", vp)); vgonel(vp); Modified: stable/10/sys/sys/vnode.h ============================================================================== --- stable/10/sys/sys/vnode.h Fri Mar 6 05:50:39 2015 (r279684) +++ stable/10/sys/sys/vnode.h Fri Mar 6 09:22:05 2015 (r279685) @@ -819,6 +819,7 @@ void vnode_destroy_vobject(struct vnode extern struct vop_vector fifo_specops; extern struct vop_vector dead_vnodeops; extern struct vop_vector default_vnodeops; +extern struct vop_vector devfs_specops; #define VOP_PANIC ((void*)(uintptr_t)vop_panic) #define VOP_NULL ((void*)(uintptr_t)vop_null)