summaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-02-24 19:07:13 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-02-24 19:07:13 +0000
commitf80e08ef9a03c50fb30f2cda865b8b444c213bd5 (patch)
tree13504f32b391b348639ebfda7a10a993ed609f6b /sys/vm
parent1cca8b0da3d704e563e451a70cdec4da6d42904b (diff)
Cleanup of vnode interface continues. Get rid of VHOLD/HOLDRELE.
Change VM/UVM to use buf_replacevnode to change the vnode associated with a buffer. Addition v_bioflag for flags written in interrupt handlers (and read at splbio, though not strictly necessary) Add vwaitforio and use it instead of a while loop of v_numoutput. Fix race conditions when manipulation vnode free list
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_swap.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c
index 56a72b5c91f..73857085549 100644
--- a/sys/vm/vm_swap.c
+++ b/sys/vm/vm_swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_swap.c,v 1.12 1999/10/11 18:04:08 deraadt Exp $ */
+/* $OpenBSD: vm_swap.c,v 1.13 2001/02/24 19:07:12 csapuntz Exp $ */
/* $NetBSD: vm_swap.c,v 1.64 1998/11/08 19:45:17 mycroft Exp $ */
/*
@@ -860,7 +860,6 @@ swstrategy(bp)
struct buf *bp;
{
struct swapdev *sdp;
- struct vnode *vp;
daddr_t bn;
bn = bp->b_blkno;
@@ -883,21 +882,10 @@ swstrategy(bp)
default:
panic("swstrategy: vnode type %x", sdp->swd_vp->v_type);
case VBLK:
+ s = splbio();
+ buf_replacevnode(bp, sdp->swd_vp);
bp->b_blkno = bn + ctod(CLSIZE);
- vp = sdp->swd_vp;
- bp->b_dev = sdp->swd_dev;
- VHOLD(vp);
- if ((bp->b_flags & B_READ) == 0) {
- int s = splbio();
- vwakeup(bp);
- vp->v_numoutput++;
- splx(s);
- }
-
- if (bp->b_vp != NULL)
- brelvp(bp);
-
- bp->b_vp = vp;
+ splx(s);
VOP_STRATEGY(bp);
return;
#ifdef SWAP_TO_FILES