Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F6698980
raw.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
cem
Jun 13 2020, 12:32 AM
2020-06-13 00:32:21 (UTC+0)
Size
968 B
Referenced Files
None
Subscribers
None
raw.txt
View Options
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 22eacf423b95..fe90a153fb94 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -3836,13 +3836,15 @@ vm_page_wire(vm_page_t m)
{
u_int old;
- KASSERT(m->object != NULL,
- ("vm_page_wire: page %p does not belong to an object", m));
- if (!vm_page_busied(m) && !vm_object_busied(m->object))
- VM_OBJECT_ASSERT_LOCKED(m->object);
- KASSERT((m->flags & PG_FICTITIOUS) == 0 ||
- VPRC_WIRE_COUNT(m->ref_count) >= 1,
- ("vm_page_wire: fictitious page %p has zero wirings", m));
+#ifdef INVARIANTS
+ if (m->object != NULL) {
+ if (!vm_page_busied(m) && !vm_object_busied(m->object))
+ VM_OBJECT_ASSERT_LOCKED(m->object);
+ } else
+ KASSERT((m->flags & PG_FICTITIOUS) == 0 ||
+ VPRC_WIRE_COUNT(m->ref_count) >= 1,
+ ("vm_page_wire: fictitious page %p has zero wirings", m));
+#endif
old = atomic_fetchadd_int(&m->ref_count, 1);
KASSERT(VPRC_WIRE_COUNT(old) != VPRC_WIRE_COUNT_MAX,
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2612885
Default Alt Text
raw.txt (968 B)
Attached To
Mode
P393 Masterwork From Distant Lands
Attached
Detach File
Event Timeline
Log In to Comment