Don't ever clear B_BUSY on a pbuf (or any other flag for that matter).

This appears to be the cause of some buffer confusion that leads to
a panic during heavy paging.

Submitted by:	 John Dyson
This commit is contained in:
David Greenman 1994-12-19 00:02:56 +00:00
parent 7c5eeb390e
commit 6185408336
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5166
2 changed files with 5 additions and 7 deletions

View File

@ -39,7 +39,7 @@
* from: Utah $Hdr: swap_pager.c 1.4 91/04/30$
*
* @(#)swap_pager.c 8.9 (Berkeley) 3/21/94
* $Id: swap_pager.c,v 1.17 1994/11/06 09:55:28 davidg Exp $
* $Id: swap_pager.c,v 1.18 1994/11/13 15:36:48 davidg Exp $
*/
/*
@ -1070,7 +1070,6 @@ swap_pager_input(swp, m, count, reqpage)
} else {
rv = VM_PAGER_OK;
}
bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_DIRTY|B_CALL|B_DONE);
--swp->sw_piip;
if (swp->sw_piip == 0)
@ -1467,7 +1466,6 @@ retrygetspace:
} else {
rv = VM_PAGER_OK;
}
bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_DIRTY|B_CALL|B_DONE);
--swp->sw_poip;
if (swp->sw_poip == 0)
@ -1639,7 +1637,6 @@ swap_pager_iodone(bp)
vwakeup(bp);
*/
bp->b_flags &= ~(B_BUSY|B_WANTED|B_PHYS|B_DIRTY|B_ASYNC);
if (bp->b_vp) {
brelvp(bp);
}

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_pager.c,v 1.7 1994/08/18 22:36:09 wollman Exp $
* $Id: vm_pager.c,v 1.8 1994/10/09 01:52:16 phk Exp $
*/
/*
@ -412,6 +412,9 @@ relpbuf(bp)
if (bp->b_vp)
brelvp(bp);
if (bp->b_flags & B_WANTED)
wakeup((caddr_t)bp);
TAILQ_INSERT_HEAD(&bswlist, bp, b_freelist);
if (bswneeded) {
@ -420,5 +423,3 @@ relpbuf(bp)
}
splx(s);
}