summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-01-09 05:04:23 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-01-09 05:04:23 +0000
commit0bbefdb25c320c2f266457ff149c676ca5f69bee (patch)
tree1b080c38aef02273797f8a8dc05dddb785a2b0ea /sys/kern
parent94645183db727f105968ec39b103dc3c25606dc1 (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')
-rw-r--r--sys/kern/kern_bufq.c4
-rw-r--r--sys/kern/vfs_bio.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/kern_bufq.c b/sys/kern/kern_bufq.c
index 911fe1b5f3d..4cba9f146b2 100644
--- a/sys/kern/kern_bufq.c
+++ b/sys/kern/kern_bufq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_bufq.c,v 1.28 2014/07/12 18:43:32 tedu Exp $ */
+/* $OpenBSD: kern_bufq.c,v 1.29 2015/01/09 05:04:22 tedu Exp $ */
/*
* Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org>
* Copyright (c) 2010 David Gwynne <dlg@openbsd.org>
@@ -239,7 +239,7 @@ bufq_drain(struct bufq *bq)
}
void
-bufq_wait(struct bufq *bq, struct buf *bp)
+bufq_wait(struct bufq *bq)
{
if (bq->bufq_hi) {
assertwaitok();
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);