summaryrefslogtreecommitdiff
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
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
-rw-r--r--sys/kern/kern_bufq.c4
-rw-r--r--sys/kern/vfs_bio.c8
-rw-r--r--sys/sys/buf.h4
3 files changed, 9 insertions, 7 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);
diff --git a/sys/sys/buf.h b/sys/sys/buf.h
index 715446366e5..b6f3b063041 100644
--- a/sys/sys/buf.h
+++ b/sys/sys/buf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: buf.h,v 1.96 2014/11/17 16:48:33 tedu Exp $ */
+/* $OpenBSD: buf.h,v 1.97 2015/01/09 05:04:22 tedu Exp $ */
/* $NetBSD: buf.h,v 1.25 1997/04/09 21:12:17 mycroft Exp $ */
/*
@@ -101,7 +101,7 @@ void bufq_requeue(struct bufq *, struct buf *);
int bufq_peek(struct bufq *);
void bufq_drain(struct bufq *);
-void bufq_wait(struct bufq *, struct buf *);
+void bufq_wait(struct bufq *);
void bufq_done(struct bufq *, struct buf *);
void bufq_quiesce(void);
void bufq_restart(void);