From fc8a5bc419be7f957bbf8bf9e3b3a1a081ec1af1 Mon Sep 17 00:00:00 2001 From: alc Date: Sun, 10 Nov 2002 07:12:04 +0000 Subject: When prot is VM_PROT_NONE, call pmap_page_protect() directly rather than indirectly through vm_page_protect(). The one remaining page flag that is updated by vm_page_protect() is already being updated by our various pmap implementations. Note: A later commit will similarly change the VM_PROT_READ case and eliminate vm_page_protect(). --- sys/kern/vfs_bio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/vfs_bio.c') diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 4c25621..e4f41e4 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1504,7 +1504,7 @@ vfs_vmio_release(bp) if ((bp->b_flags & B_ASYNC) == 0 && !m->valid && m->hold_count == 0) { vm_page_busy(m); - vm_page_protect(m, VM_PROT_NONE); + pmap_page_protect(m, VM_PROT_NONE); vm_page_free(m); } else if (bp->b_flags & B_DIRECT) { vm_page_try_to_free(m); @@ -3268,7 +3268,7 @@ retry: * It may not work properly with small-block devices. * We need to find a better way. */ - vm_page_protect(m, VM_PROT_NONE); + pmap_page_protect(m, VM_PROT_NONE); if (clear_modify) vfs_page_set_valid(bp, foff, i, m); else if (m->valid == VM_PAGE_BITS_ALL && -- cgit v1.1