It is possible for a page in the cache to be busy. vm_pageout.c was not

checking for this condition while it tried to free cache pages.  Fixed.
This commit is contained in:
Matthew Dillon 1999-01-24 01:06:31 +00:00
parent a7039a1d42
commit aaba53da90

View File

@ -65,7 +65,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_pageout.c,v 1.130 1999/01/21 08:29:12 dillon Exp $
* $Id: vm_pageout.c,v 1.131 1999/01/21 10:12:54 dillon Exp $
*/
/*
@ -1082,6 +1082,10 @@ rescan0:
m = vm_page_list_find(PQ_CACHE, cache_rover);
if (!m)
break;
if ((m->flags & PG_BUSY) || m->busy || m->hold_count || m->wire_count) {
vm_page_deactivate(m);
continue;
}
cache_rover = (cache_rover + PQ_PRIME2) & PQ_L2_MASK;
vm_pageout_page_free(m);
cnt.v_dfree++;