summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-08-08 19:12:36 +0000
committeralc <alc@FreeBSD.org>2002-08-08 19:12:36 +0000
commit170fb8b34d55cd9f478b6dd03f73ad369ade2695 (patch)
tree39b8b081cdc3f07249e36d90bc907a8ce1721f67 /sys/vm/vm_page.c
parent761cf38833d9eb8e909877dd244bfdfbf00825c7 (diff)
downloadFreeBSD-src-170fb8b34d55cd9f478b6dd03f73ad369ade2695.zip
FreeBSD-src-170fb8b34d55cd9f478b6dd03f73ad369ade2695.tar.gz
o Use pmap_page_is_mapped() in vm_page_protect() rather than the PG_MAPPED
flag. (This is the only place in the entire kernel where the PG_MAPPED flag is tested. It will be removed soon.)
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r--sys/vm/vm_page.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 91da256..5075fce 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -445,7 +445,7 @@ void
vm_page_protect(vm_page_t mem, int prot)
{
if (prot == VM_PROT_NONE) {
- if (mem->flags & (PG_WRITEABLE|PG_MAPPED)) {
+ if (pmap_page_is_mapped(mem) || (mem->flags & PG_WRITEABLE)) {
pmap_page_protect(mem, VM_PROT_NONE);
vm_page_flag_clear(mem, PG_WRITEABLE|PG_MAPPED);
}
OpenPOWER on IntegriCloud