vm_fault: drop never-true busy_sleep test

vm_fault_busy_sleep() tests to see whether the page fs->m matches the
value looked up at fs->pindex. At that point, a lock is held on
fs->object, and it has been held since before vm_fault_object() also
looked up fs->pindex in fs->object and stored the result in fs->m. So
the values must match, and the test is not necessary. Drop it.

Reviewed by:	alc, markj
Differential Revision:	https://reviews.freebsd.org/D51179
This commit is contained in:
Doug Moore
2025-07-06 15:46:00 -05:00
parent 4add1a7a46
commit 2d6185cf87
+1 -2
View File
@@ -1441,8 +1441,7 @@ vm_fault_busy_sleep(struct faultstate *fs)
}
vm_object_pip_wakeup(fs->object);
vm_fault_unlock_map(fs);
if (fs->m != vm_page_lookup(fs->object, fs->pindex) ||
!vm_page_busy_sleep(fs->m, "vmpfw", 0))
if (!vm_page_busy_sleep(fs->m, "vmpfw", 0))
VM_OBJECT_UNLOCK(fs->object);
VM_CNT_INC(v_intrans);
vm_object_deallocate(fs->first_object);