error = VOP_GETPAGES(vp, offset, pps, npagesp, centeridx, access_type, advice, flags); VOP_UNLOCK(vp, LK_RELEASE, p); return error;
for (lcv = 0, current_offset = offset ; lcv < *npagesp ; lcv++, current_offset += PAGE_SIZE) {    if (pps[lcv] != NULL || (lcv != centeridx && (flags & PGO_ALLPAGES) == 0)) continue;    while (pps[lcv] == NULL) {	   ptmp = uvm_pagelookup(uobj, current_offset);   if (ptmp == NULL) {  ptmp = uvm_pagealloc(uobj, current_offset, NULL, 0);   if (ptmp == NULL) { simple_unlock(&uobj->vmobjlock); uvm_wait("uvn_getpage"); simple_lock(&uobj->vmobjlock);   continue; }   break; }   if ((ptmp->flags & (PG_BUSY|PG_RELEASED)) != 0) { ptmp->flags |= PG_WANTED; UVM_UNLOCK_AND_WAIT(ptmp, &uobj->vmobjlock, FALSE, "uvn_get",0); simple_lock(&uobj->vmobjlock); continue;	 }   ptmp->flags |= PG_BUSY; UVM_PAGE_OWN(ptmp, "uvn_get2"); pps[lcv] = ptmp; }    if (pps[lcv]) continue;			    result = uvn_io((struct uvm_vnode *) uobj, &ptmp, 1, PGO_SYNCIO, UIO_READ);     simple_lock(&uobj->vmobjlock); if (result != VM_PAGER_OK) { if (ptmp->flags & PG_WANTED)  wakeup(ptmp);  ptmp->flags &= ~(PG_WANTED|PG_BUSY); UVM_PAGE_OWN(ptmp, NULL); uvm_lock_pageq(); uvm_pagefree(ptmp); uvm_unlock_pageq(); simple_unlock(&uobj->vmobjlock); return(result); }    ptmp->flags &= ~PG_FAKE;		 pmap_clear_modify(ptmp);		 pps[lcv] = ptmp;  }	    simple_unlock(&uobj->vmobjlock); return (VM_PAGER_OK);
uvn_get(uobj, offset, pps, npagesp, centeridx, access_type, advice, flags)	struct uvm_object *uobj;	voff_t offset;	struct vm_page **pps;		/* IN/OUT */	int *npagesp;			/* IN (OUT if PGO_LOCKED) */	int centeridx;	vm_prot_t access_type;	int advice, flags;{	struct vnode *vp = (struct vnode *)uobj;	struct proc *p = curproc;	int error;	UVMHIST_FUNC("uvn_get"); UVMHIST_CALLED(ubchist);	UVMHIST_LOG(ubchist, "vp %p off 0x%x", vp, (int)offset, 0,0);	error = vn_lock(vp, LK_EXCLUSIVE|LK_RECURSEFAIL|LK_NOWAIT, p);	if (error) {		if (error == EBUSY)			return EAGAIN;		return error;	}	error = VOP_GETPAGES(vp, offset, pps, npagesp, centeridx,		     access_type, advice, flags);	VOP_UNLOCK(vp, LK_RELEASE, p);	return error;}