diff options
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_fault.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 9257fe8..03c68dd 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -722,7 +722,10 @@ vnode_locked: */ if (rv == VM_PAGER_ERROR || rv == VM_PAGER_BAD) { vm_page_lock(fs.m); - vm_page_free(fs.m); + if (fs.m->wire_count == 0) + vm_page_free(fs.m); + else + vm_page_xunbusy_maybelocked(fs.m); vm_page_unlock(fs.m); fs.m = NULL; unlock_and_deallocate(&fs); @@ -742,7 +745,10 @@ vnode_locked: */ if (fs.object != fs.first_object) { vm_page_lock(fs.m); - vm_page_free(fs.m); + if (fs.m->wire_count == 0) + vm_page_free(fs.m); + else + vm_page_xunbusy_maybelocked(fs.m); vm_page_unlock(fs.m); fs.m = NULL; } |