summaryrefslogtreecommitdiff
path: root/sys/kern/kern_physio.c
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2007-05-26 20:26:52 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2007-05-26 20:26:52 +0000
commit196f5066228d908cbac060396a1aba557efe1ef3 (patch)
tree5c48aa4f82af6d902afe35afb642c3d4225a1a07 /sys/kern/kern_physio.c
parent6e18a0b85a66c596fb041fbf27229487f6661bbf (diff)
Dynamic buffer cache. Initial diff from mickey@, okay art@ beck@ toby@
deraadt@ dlg@.
Diffstat (limited to 'sys/kern/kern_physio.c')
-rw-r--r--sys/kern/kern_physio.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c
index d2547a66a30..dee322dabaf 100644
--- a/sys/kern/kern_physio.c
+++ b/sys/kern/kern_physio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_physio.c,v 1.27 2006/12/21 02:28:47 krw Exp $ */
+/* $OpenBSD: kern_physio.c,v 1.28 2007/05/26 20:26:51 pedro Exp $ */
/* $NetBSD: kern_physio.c,v 1.28 1997/05/19 10:43:28 pk Exp $ */
/*-
@@ -262,8 +262,12 @@ struct buf *
getphysbuf(void)
{
struct buf *bp;
+ int s;
+ s = splbio();
bp = pool_get(&bufpool, PR_WAITOK);
+ splx(s);
+
bzero(bp, sizeof(*bp));
/* XXXCDC: are the following two lines necessary? */
@@ -281,6 +285,8 @@ getphysbuf(void)
void
putphysbuf(struct buf *bp)
{
+ splassert(IPL_BIO);
+
/* XXXCDC: is this necessary? */
if (bp->b_vp)
brelvp(bp);