Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P394
Masterwork From Distant Lands
Active
Public
Actions
Authored by
cem
on Jun 13 2020, 12:34 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F6698983: raw.txt
Jun 13 2020, 12:34 AM
2020-06-13 00:34:15 (UTC+0)
Subscribers
None
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 22eacf423b95..8e95515b74d1 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -3836,10 +3836,13 @@ 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);
+#ifdef INVARIANTS
+ if (m->object != NULL) {
+ if (!vm_page_busied(m) && !vm_object_busied(m->object))
+ VM_OBJECT_ASSERT_LOCKED(m->object);
+ } else
+ KASSERT(vm_page_wired(m), ("vm_page_wire: page %p unwired", m));
+#endif
KASSERT((m->flags & PG_FICTITIOUS) == 0 ||
VPRC_WIRE_COUNT(m->ref_count) >= 1,
("vm_page_wire: fictitious page %p has zero wirings", m));
Event Timeline
cem
edited the content of this paste.
(Show Details)
Jun 13 2020, 12:34 AM
2020-06-13 00:34:15 (UTC+0)
cem
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
cem
mentioned this in
D26173: Permit vm_page_wire() for pages not belonging to an object.
.
Aug 24 2020, 9:11 PM
2020-08-24 21:11:42 (UTC+0)
Log In to Comment