diff options
author | kib <kib@FreeBSD.org> | 2016-10-24 11:33:42 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-10-24 11:33:42 +0000 |
commit | 73ff320632f8ec795c0125fc7bf65057d83a1f0d (patch) | |
tree | 18d81cdad1edda5320165faf1ab8b4bbeff9d684 /sys/vm | |
parent | 10667a458da9ab41ac0006ea90ae22536bc8c1c7 (diff) | |
download | FreeBSD-src-73ff320632f8ec795c0125fc7bf65057d83a1f0d.zip FreeBSD-src-73ff320632f8ec795c0125fc7bf65057d83a1f0d.tar.gz |
MFC r307501:
If vm_fault_hold(9) finds that fs.m is wired, do not free it after a
pager error, leave the page to the wire owner.
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; } |