diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_pageout.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 6a56fd7..dce3aad 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1115,9 +1115,11 @@ vm_pageout_scan(struct vm_domain *vmd, int pass) * then the page may still be modified until the last of those * mappings are removed. */ - vm_page_test_dirty(m); - if (m->dirty == 0 && object->ref_count != 0) - pmap_remove_all(m); + if (object->ref_count != 0) { + vm_page_test_dirty(m); + if (m->dirty == 0) + pmap_remove_all(m); + } if (m->valid == 0) { /* |