From 519f1ccd36408835a3ffde065741910f56b9ebbe Mon Sep 17 00:00:00 2001 From: glebius Date: Fri, 12 Jun 2015 11:32:20 +0000 Subject: Make KPI of vm_pager_get_pages() more strict: if a pager changes a page in the requested array, then it is responsible for disposition of previous page and is responsible for updating the entry in the requested array. Now consumers of KPI do not need to re-lookup the pages after call to vm_pager_get_pages(). Reviewed by: kib Sponsored by: Netflix Sponsored by: Nginx, Inc. --- sys/vm/vm_fault.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'sys/vm/vm_fault.c') diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 0c84d44..7391465 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -679,19 +679,12 @@ vnode_locked: /* * Found the page. Leave it busy while we play * with it. - */ - - /* - * Relookup in case pager changed page. Pager + * + * Pager could have changed the page. Pager * is responsible for disposition of old page * if moved. */ - fs.m = vm_page_lookup(fs.object, fs.pindex); - if (!fs.m) { - unlock_and_deallocate(&fs); - goto RetryFault; - } - + fs.m = marray[reqpage]; hardfault++; break; /* break to PAGE HAS BEEN FOUND */ } -- cgit v1.1