diff options
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 1241775..2177289 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -2558,6 +2558,15 @@ vm_page_cache(vm_page_t m) vm_page_free(m); return; } + + /* + * The above call to vm_radix_insert() could reclaim the one pre- + * existing cached page from this object, resulting in a call to + * vdrop(). + */ + if (!cache_was_empty) + cache_was_empty = vm_radix_is_singleton(&object->cache); + m->flags |= PG_CACHED; cnt.v_cache_count++; PCPU_INC(cnt.v_tcached); |