Permalink
Browse files

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)
  • Loading branch information...
1 parent d973ab2 commit 57b95400601bfa18b78d342b43a877efa06e81d1 @kostikbel kostikbel committed Oct 9, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 sys/kern/vfs_bio.c
View
@@ -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);
/*

0 comments on commit 57b9540

Please sign in to comment.