Fixed a certain panic on IO error in sendfile(): Page must be set PG_BUSY

before calling vm_page_free() on it.
This commit is contained in:
dg 2000-11-12 14:51:15 +00:00
parent 3110b2627a
commit b529eb36e4

View File

@ -1599,8 +1599,10 @@ sendfile(struct proc *p, struct sendfile_args *uap)
*/
if (pg->wire_count == 0 && pg->valid == 0 &&
pg->busy == 0 && !(pg->flags & PG_BUSY) &&
pg->hold_count == 0)
pg->hold_count == 0) {
vm_page_busy(pg);
vm_page_free(pg);
}
sbunlock(&so->so_snd);
goto done;
}