diff options
author | alc <alc@FreeBSD.org> | 2003-06-22 00:00:11 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-06-22 00:00:11 +0000 |
commit | 752ed0a2b93a05db0bf35585d603eac4ae2bd079 (patch) | |
tree | b03b460796bce6650f3c10c47f009b3eb0485f53 /sys/vm/vm_fault.c | |
parent | 6e4d4545607ba5d163fb65614d9ca74362cb9182 (diff) | |
download | FreeBSD-src-752ed0a2b93a05db0bf35585d603eac4ae2bd079.zip FreeBSD-src-752ed0a2b93a05db0bf35585d603eac4ae2bd079.tar.gz |
Make some style and white-space changes to the copy-on-write path through
vm_fault(); remove a pointless assignment statement from that path.
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r-- | sys/vm/vm_fault.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index fcb2426..cefcfb9 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -707,23 +707,21 @@ readrest: * We don't chase down the shadow chain */ fs.object == fs.first_object->backing_object) { + vm_page_lock_queues(); /* * get rid of the unnecessary page */ - vm_page_lock_queues(); pmap_remove_all(fs.first_m); vm_page_free(fs.first_m); - fs.first_m = NULL; - /* * grab the page and put it into the * process'es object. The page is * automatically made dirty. */ vm_page_rename(fs.m, fs.first_object, fs.first_pindex); - fs.first_m = fs.m; - vm_page_busy(fs.first_m); + vm_page_busy(fs.m); vm_page_unlock_queues(); + fs.first_m = fs.m; fs.m = NULL; cnt.v_cow_optim++; } else { @@ -740,7 +738,6 @@ readrest: */ release_page(&fs); } - /* * fs.object != fs.first_object due to above * conditional @@ -748,15 +745,13 @@ readrest: VM_OBJECT_LOCK(fs.object); vm_object_pip_wakeup(fs.object); VM_OBJECT_UNLOCK(fs.object); - /* * Only use the new page below... */ - cnt.v_cow_faults++; - fs.m = fs.first_m; fs.object = fs.first_object; fs.pindex = fs.first_pindex; - + fs.m = fs.first_m; + cnt.v_cow_faults++; } else { prot &= ~VM_PROT_WRITE; } |