summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-03-06 09:22:05 +0000
committerkib <kib@FreeBSD.org>2015-03-06 09:22:05 +0000
commit06a96cf2f5837dcb35818e51ab91d89ab882037c (patch)
treef2af2cfa515c93b00b88369146280cb86a4a0baf /sys/kern/vfs_subr.c
parentdd89b387bb6d5c04214a20007e1f352d01a7f549 (diff)
downloadFreeBSD-src-06a96cf2f5837dcb35818e51ab91d89ab882037c.zip
FreeBSD-src-06a96cf2f5837dcb35818e51ab91d89ab882037c.tar.gz
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.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index a2690c6..8fb7734 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -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);
OpenPOWER on IntegriCloud