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)
This commit is contained in:
Konstantin Belousov 2013-10-09 18:45:01 +00:00
parent 2c1531e746
commit acb9d2c7f0

View File

@ -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);
/*