summaryrefslogtreecommitdiffstats
path: root/sys/vm/swap_pager.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/swap_pager.c')
-rw-r--r--sys/vm/swap_pager.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index 4199289..22487dd 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -2545,18 +2545,9 @@ swapdev_strategy(struct buf *bp, struct swdevt *sp)
s = splvm();
if (bp->b_iocmd == BIO_WRITE) {
vp = bp->b_vp;
- if (vp) {
- VI_LOCK(vp);
- vp->v_numoutput--;
- if ((vp->v_iflag & VI_BWAIT) && vp->v_numoutput <= 0) {
- vp->v_iflag &= ~VI_BWAIT;
- wakeup(&vp->v_numoutput);
- }
- VI_UNLOCK(vp);
- }
- VI_LOCK(vp2);
- vp2->v_numoutput++;
- VI_UNLOCK(vp2);
+ if (vp)
+ bufobj_wdrop(&vp->v_bufobj);
+ bufobj_wref(&vp2->v_bufobj);
}
bp->b_vp = vp2;
splx(s);
OpenPOWER on IntegriCloud