Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152029831
D15582.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15582.diff
View Options
Index: head/sys/vm/vm_fault.c
===================================================================
--- head/sys/vm/vm_fault.c
+++ head/sys/vm/vm_fault.c
@@ -482,10 +482,9 @@
m_mtx = NULL;
for (i = 0; i < npages; i++) {
vm_page_change_lock(&m[i], &m_mtx);
- if ((fault_flags & VM_FAULT_WIRE) != 0) {
- KASSERT(wired, ("VM_FAULT_WIRE && !wired"));
+ if ((fault_flags & VM_FAULT_WIRE) != 0)
vm_page_wire(&m[i]);
- } else
+ else
vm_page_activate(&m[i]);
if (m_hold != NULL && m[i].pindex == fs->first_pindex) {
*m_hold = &m[i];
@@ -1247,6 +1246,10 @@
unlock_and_deallocate(&fs);
goto RetryFault;
}
+
+ /* Reassert because wired may have changed. */
+ KASSERT(wired || (fault_flags & VM_FAULT_WIRE) == 0,
+ ("!wired && VM_FAULT_WIRE"));
}
}
@@ -1290,10 +1293,9 @@
* If the page is not wired down, then put it where the pageout daemon
* can find it.
*/
- if ((fault_flags & VM_FAULT_WIRE) != 0) {
- KASSERT(wired, ("VM_FAULT_WIRE && !wired"));
+ if ((fault_flags & VM_FAULT_WIRE) != 0)
vm_page_wire(fs.m);
- } else
+ else
vm_page_activate(fs.m);
if (m_hold != NULL) {
*m_hold = fs.m;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 13, 5:24 AM (6 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31363830
Default Alt Text
D15582.diff (1 KB)
Attached To
Mode
D15582: Eliminate redundant KASSERT()s in vm_fault() and its helpers
Attached
Detach File
Event Timeline
Log In to Comment