diff options
author | dillon <dillon@FreeBSD.org> | 1999-01-24 00:55:04 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-01-24 00:55:04 +0000 |
commit | e554adda080faaea9b4719a3051cff01a1090d36 (patch) | |
tree | 9daf97ec62f8ec4a92fc184683456e4bb09c6144 /sys | |
parent | 6db82357cae21f402469dd9f1c1f698833aa8e17 (diff) | |
download | FreeBSD-src-e554adda080faaea9b4719a3051cff01a1090d36.zip FreeBSD-src-e554adda080faaea9b4719a3051cff01a1090d36.tar.gz |
Get rid of unused old_m in vm_fault. Add INVARIANTS to test whether
page is still busy after all the hell vm_fault goes through.. it is
supposed to be, and printf() if it isn't. don't panic, though.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_fault.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 3cf0be5..d44a248 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -66,7 +66,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_fault.c,v 1.95 1999/01/21 09:35:38 dillon Exp $ + * $Id: vm_fault.c,v 1.96 1999/01/23 06:00:27 dillon Exp $ */ /* @@ -178,7 +178,6 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags) int result; boolean_t wired; int map_generation; - vm_page_t old_m; vm_object_t next_object; vm_page_t marray[VM_FAULT_READ]; int hardfault; @@ -577,8 +576,6 @@ readrest: * is held.] */ - old_m = fs.m; /* save page that would be copied */ - /* * If the page is being written, but isn't already owned by the * top-level object, we have to copy it into a new page owned by the @@ -768,6 +765,17 @@ readrest: } } + /* + * Page had better still be busy + */ + +#ifdef INVARIANTS + if ((fs.m->flags & PG_BUSY) == 0) { + printf("WARNING! PAGE %p NOT BUSY!!!\n", fs.m); + vm_page_busy(fs.m); + } +#endif + unlock_things(&fs); fs.m->valid = VM_PAGE_BITS_ALL; vm_page_flag_clear(fs.m, PG_ZERO); @@ -785,6 +793,7 @@ readrest: * If the page is not wired down, then put it where the pageout daemon * can find it. */ + if (fault_flags & VM_FAULT_WIRE_MASK) { if (wired) vm_page_wire(fs.m); |