summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-12-01 05:40:18 +0000
committeralc <alc@FreeBSD.org>2002-12-01 05:40:18 +0000
commit7892b90ccadb0576dac25b12159e126517310b59 (patch)
treee1565aae9ae4c30b5618772460e47079bcd5cfae /sys
parentbd2e4af969fc3864d1d4f78f1e5ec35f6a39ecaa (diff)
downloadFreeBSD-src-7892b90ccadb0576dac25b12159e126517310b59.zip
FreeBSD-src-7892b90ccadb0576dac25b12159e126517310b59.tar.gz
Hold the page queues lock when calling pmap_protect(); it updates fields
of the vm_page structure. Nearby, remove an unnecessary semicolon and return statement. Approved by: re (blanket)
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_pageout.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 4ac5259..d81d581 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -592,17 +592,19 @@ vm_pageout_map_deactivate_pages(map, desired)
vm_pageout_object_deactivate_pages(map, obj, desired, 0);
}
tmpe = tmpe->next;
- };
+ }
/*
* Remove all mappings if a process is swapped out, this will free page
* table pages.
*/
- if (desired == 0 && nothingwired)
+ if (desired == 0 && nothingwired) {
+ vm_page_lock_queues();
pmap_remove(vm_map_pmap(map), vm_map_min(map),
vm_map_max(map));
+ vm_page_unlock_queues();
+ }
vm_map_unlock(map);
- return;
}
#endif /* !defined(NO_SWAPPING) */
OpenPOWER on IntegriCloud