From cc0f04fdcf61d6d190f15f632f4dedfdc8522e98 Mon Sep 17 00:00:00 2001 From: alc Date: Sun, 20 Apr 2003 20:37:14 +0000 Subject: - Lock the vm_object when performing vm_object_pip_wakeup(). - Merge two identical cases in a switch statement. --- sys/vm/vm_pageout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/vm/vm_pageout.c') diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 0ea8390..4139e71 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -397,14 +397,13 @@ vm_pageout_flush(mc, count, flags) (flags | ((object == kernel_object) ? VM_PAGER_PUT_SYNC : 0)), pageout_status); + VM_OBJECT_LOCK(object); vm_page_lock_queues(); for (i = 0; i < count; i++) { vm_page_t mt = mc[i]; switch (pageout_status[i]) { case VM_PAGER_OK: - numpagedout++; - break; case VM_PAGER_PEND: numpagedout++; break; @@ -443,6 +442,7 @@ vm_pageout_flush(mc, count, flags) pmap_page_protect(mt, VM_PROT_READ); } } + VM_OBJECT_UNLOCK(object); return numpagedout; } -- cgit v1.1