summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
aa94a9f)
SCCS-vsn: sys/kern/kern_physio.c 7.10
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)kern_physio.c 7.9 (Berkeley) %G%
+ * @(#)kern_physio.c 7.10 (Berkeley) %G%
bp->b_pfcent = pfcent;
} else
bp->b_un.b_addr = addr;
bp->b_pfcent = pfcent;
} else
bp->b_un.b_addr = addr;
- if (bp->b_vp)
- panic("swap: active vp");
- VREF(vp);
- bp->b_vp = vp;
- bp->b_dev = vp->v_rdev;
while (nbytes > 0) {
bp->b_blkno = dblkno;
while (nbytes > 0) {
bp->b_blkno = dblkno;
+ if (bp->b_vp)
+ brelvp(bp);
+ VREF(vp);
+ bp->b_vp = vp;
+ bp->b_dev = vp->v_rdev;
bp->b_bcount = nbytes;
minphys(bp);
c = bp->b_bcount;
bp->b_bcount = nbytes;
minphys(bp);
c = bp->b_bcount;
dblkno += btodb(c);
}
bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_PAGET|B_UAREA|B_DIRTY);
dblkno += btodb(c);
}
bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_PAGET|B_UAREA|B_DIRTY);
freeswbuf(bp);
return (error);
}
freeswbuf(bp);
return (error);
}
s = splbio();
bp->av_forw = bswlist.av_forw;
bswlist.av_forw = bp;
s = splbio();
bp->av_forw = bswlist.av_forw;
bswlist.av_forw = bp;
+ if (bp->b_vp)
+ brelvp(bp);
if (bswlist.b_flags & B_WANTED) {
bswlist.b_flags &= ~B_WANTED;
wakeup((caddr_t)&bswlist);
if (bswlist.b_flags & B_WANTED) {
bswlist.b_flags &= ~B_WANTED;
wakeup((caddr_t)&bswlist);