Change #if defined(DIAGNOSTIC) to KASSERT.

This commit is contained in:
Alan Cox 2006-01-31 19:06:51 +00:00
parent 4a46d2a6df
commit 6c237adcea

View File

@ -809,10 +809,9 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
*/
vm_page_lock_queues();
if ((m = vm_page_select_cache(color)) == NULL) {
#if defined(DIAGNOSTIC)
if (cnt.v_cache_count > 0)
printf("vm_page_alloc(NORMAL): missing pages on cache queue: %d\n", cnt.v_cache_count);
#endif
KASSERT(cnt.v_cache_count == 0,
("vm_page_alloc: cache queue is missing %d pages",
cnt.v_cache_count));
vm_page_unlock_queues();
atomic_add_int(&vm_pageout_deficit, 1);
pagedaemon_wakeup();