and the bufq pointer might be NULL at the time it is `saved'.
Found the hard way on sparc due to the limited kva, with all disk active
processes ending up sleeping on "buf_needva".
ok kettenis@ krw@
-/* $OpenBSD: vfs_bio.c,v 1.166 2015/01/09 05:04:22 tedu Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.167 2015/01/18 14:01:54 miod Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*
int rv, async, wasdelayed, s;
struct vnode *vp;
struct mount *mp;
- struct bufq *bq;
vp = bp->b_vp;
if (vp != NULL)
/* Initiate disk write. Make sure the appropriate party is charged. */
bp->b_vp->v_numoutput++;
- bq = bp->b_bq;
splx(s);
SET(bp->b_flags, B_WRITEINPROG);
VOP_STRATEGY(bp);
* the number of outstanding write bufs drops below the low
* water mark.
*/
- if (bq)
- bufq_wait(bq);
+ if (bp->b_bq)
+ bufq_wait(bp->b_bq);
if (async)
return (0);