From 5637a5914382985bbd9e7d21e6966611eb3d8224 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 3 May 2010 19:19:58 +0000 Subject: [PATCH] Handle busy status of the page in a way expected for pager_getpage(). Flush requested page, unbusy other pages, do not clear m->busy. Reviewed by: alc MFC after: 1 week --- sys/vm/phys_pager.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index 42cdab3ebeca..97674e35cf7a 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -152,10 +152,10 @@ phys_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) KASSERT(m[i]->dirty == 0, ("phys_pager_getpages: dirty page %p", m[i])); /* The requested page must remain busy, the others not. */ - if (reqpage != i) { - m[i]->oflags &= ~VPO_BUSY; - m[i]->busy = 0; - } + if (i == reqpage) + vm_page_flash(m[i]); + else + vm_page_wakeup(m[i]); } return (VM_PAGER_OK); }