diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-05-16 00:03:06 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-05-16 00:03:06 +0000 |
commit | 2bd48043d848f337cd8dd19270a3fd343f361ac4 (patch) | |
tree | a548c893d2297a58590616a697f350722fc60ec4 /sys | |
parent | c28d2fabbfffe9cef91590bb8b01e561f7e25a0f (diff) |
sprinkle some splassert(IPL_BIO) in some functions that are commented as "should be called at splbio()"
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_bio.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 14 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 8496a477f8b..09eb2fba844 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.59 2002/04/27 15:29:30 art Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.60 2002/05/16 00:03:05 art Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /*- @@ -484,6 +484,8 @@ void buf_dirty(bp) struct buf *bp; { + splassert(IPL_BIO); + if (ISSET(bp->b_flags, B_DELWRI) == 0) { SET(bp->b_flags, B_DELWRI); reassignbuf(bp); @@ -497,6 +499,8 @@ void buf_undirty(bp) struct buf *bp; { + splassert(IPL_BIO); + if (ISSET(bp->b_flags, B_DELWRI)) { CLR(bp->b_flags, B_DELWRI); reassignbuf(bp); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index b8cc7b3a2d7..c7c23c02212 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.83 2002/03/14 01:27:06 millert Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.84 2002/05/16 00:03:05 art Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -1924,6 +1924,8 @@ vwaitforio(vp, slpflag, wmesg, timeo) { int error = 0; + splassert(IPL_BIO); + while (vp->v_numoutput) { vp->v_bioflag |= VBIOWAIT; error = tsleep((caddr_t)&vp->v_numoutput, @@ -1945,6 +1947,8 @@ void vwakeup(vp) struct vnode *vp; { + splassert(IPL_BIO); + if (vp != NULL) { if (vp->v_numoutput-- == 0) panic("vwakeup: neg numoutput"); @@ -2089,6 +2093,8 @@ bgetvp(vp, bp) register struct vnode *vp; register struct buf *bp; { + splassert(IPL_BIO); + if (bp->b_vp) panic("bgetvp: not free"); @@ -2115,6 +2121,8 @@ brelvp(bp) { struct vnode *vp; + splassert(IPL_BIO); + if ((vp = bp->b_vp) == (struct vnode *) 0) panic("brelvp: NULL"); /* @@ -2166,6 +2174,8 @@ buf_replacevnode(bp, newvp) { struct vnode *oldvp = bp->b_vp; + splassert(IPL_BIO); + if (oldvp) brelvp(bp); @@ -2193,6 +2203,8 @@ reassignbuf(bp) int delay; struct vnode *vp = bp->b_vp; + splassert(IPL_BIO); + /* * Delete from old vnode list, if on one. */ |