summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-10-09 18:45:01 +0000
committerkib <kib@FreeBSD.org>2013-10-09 18:45:01 +0000
commit57b95400601bfa18b78d342b43a877efa06e81d1 (patch)
treed78d514bda69812e558f0d7394b81cd7088f96bf /sys/kern
parentd973ab2c238486eba90659984a91cc2843190d7f (diff)
downloadFreeBSD-src-57b95400601bfa18b78d342b43a877efa06e81d1.zip
FreeBSD-src-57b95400601bfa18b78d342b43a877efa06e81d1.tar.gz
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)
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_bio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 1690ee5..362de37 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);
/*
OpenPOWER on IntegriCloud