From acb9d2c7f022fc412e3618b7a4c18546f8903b0b Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 9 Oct 2013 18:45:01 +0000 Subject: [PATCH] The device vnodes are often unlocked when bread() or bwrite() is called. This probably should be fixed eventually, but for now it is not needed to try to flush such vnodes from the buffer allocation context. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (gjb) --- sys/kern/vfs_bio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 1690ee5a05e..362de37e8aa 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2076,7 +2076,8 @@ getnewbuf_bufd_help(struct vnode *vp, int gbflags, int slpflag, int slptimeo, wait = MNT_NOWAIT; mtx_lock(&nblock); while (needsbuffer & flags) { - if (vp != NULL && (td->td_pflags & TDP_BUFNEED) == 0) { + if (vp != NULL && vp->v_type != VCHR && + (td->td_pflags & TDP_BUFNEED) == 0) { mtx_unlock(&nblock); /*