summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_swap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_swap.c')
-rw-r--r--sys/vm/vm_swap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c
index bdaf1a7..c12b532 100644
--- a/sys/vm/vm_swap.c
+++ b/sys/vm/vm_swap.c
@@ -142,11 +142,13 @@ swapdev_strategy(ap)
if (bp->b_iocmd == BIO_WRITE) {
vp = bp->b_vp;
if (vp) {
+ VI_LOCK(vp);
vp->v_numoutput--;
- if ((vp->v_flag & VBWAIT) && vp->v_numoutput <= 0) {
- vp->v_flag &= ~VBWAIT;
+ if ((vp->v_iflag & VI_BWAIT) && vp->v_numoutput <= 0) {
+ vp->v_iflag &= ~VI_BWAIT;
wakeup(&vp->v_numoutput);
}
+ VI_UNLOCK(vp);
}
sp->sw_vp->v_numoutput++;
}
OpenPOWER on IntegriCloud