diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2015-01-09 05:04:23 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2015-01-09 05:04:23 +0000 |
commit | 0bbefdb25c320c2f266457ff149c676ca5f69bee (patch) | |
tree | 1b080c38aef02273797f8a8dc05dddb785a2b0ea /sys/kern/vfs_bio.c | |
parent | 94645183db727f105968ec39b103dc3c25606dc1 (diff) |
save the bufq pointer from the buf before we turn it loose so it won't
change on us. also, remove unused second arg to bufq_wait.
from pedro at bitrig via david hill.
ok beck kettenis
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index fd2d47a7340..e7736942948 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.165 2014/12/16 18:30:04 tedu Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.166 2015/01/09 05:04:22 tedu Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /* @@ -516,6 +516,7 @@ bwrite(struct buf *bp) int rv, async, wasdelayed, s; struct vnode *vp; struct mount *mp; + struct bufq *bq; vp = bp->b_vp; if (vp != NULL) @@ -569,6 +570,7 @@ bwrite(struct buf *bp) /* 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); @@ -578,8 +580,8 @@ bwrite(struct buf *bp) * the number of outstanding write bufs drops below the low * water mark. */ - if (bp->b_bq) - bufq_wait(bp->b_bq, bp); + if (bq) + bufq_wait(bq); if (async) return (0); |