From 1f1e13ca0304c5d3cab0d4c118678ec546f935bc Mon Sep 17 00:00:00 2001 From: attilio Date: Wed, 20 Feb 2013 10:51:34 +0000 Subject: There is no need to use VM_OBJECT_LOCKED() as the assertion won't make the check available in any case if INVARIANTS is switched off. Remove VM_OBJECT_LOCKED(). --- sys/amd64/amd64/pmap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/amd64') diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 662f926..c1ffe5c 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3492,9 +3492,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m, KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || va >= kmi.clean_eva, ("pmap_enter: managed mapping within the clean submap")); - KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || - VM_OBJECT_LOCKED(m->object), - ("pmap_enter: page %p is not busy", m)); + if ((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) == 0) + VM_OBJECT_LOCK_ASSERT(m->object, RA_WLOCKED); pa = VM_PAGE_TO_PHYS(m); newpte = (pt_entry_t)(pa | PG_A | PG_V); if ((access & VM_PROT_WRITE) != 0) -- cgit v1.1