diff options
author | 2002-05-16 00:03:05 +0000 | |
---|---|---|
committer | 2002-05-16 00:03:05 +0000 | |
commit | 9ec099c02c32c384e8c8e190cb1ba0f4a3a51351 (patch) | |
tree | 3a9f9b39f7f2d837afd600ed23726d684cb8f8fe | |
parent | typo in comment. (diff) | |
download | wireguard-openbsd-9ec099c02c32c384e8c8e190cb1ba0f4a3a51351.tar.xz wireguard-openbsd-9ec099c02c32c384e8c8e190cb1ba0f4a3a51351.zip |
sprinkle some splassert(IPL_BIO) in some functions that are commented as "should be called at splbio()"
-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. */ |