vnode_pager_freepage() is really vm_page_free() in disguise,

nuke vnode_pager_freepage() and replace all calls to it with vm_page_free()
This commit is contained in:
Alfred Perlstein 2001-04-19 06:18:23 +00:00
parent 3fb5ffd286
commit d8d5fa8805
6 changed files with 17 additions and 25 deletions

View File

@ -445,7 +445,7 @@ nwfs_getpages(ap)
printf("nwfs_getpages: error %d\n",error);
for (i = 0; i < npages; i++) {
if (ap->a_reqpage != i)
vnode_pager_freepage(pages[i]);
vm_page_free(pages[i]);
}
return VM_PAGER_ERROR;
}
@ -487,7 +487,7 @@ nwfs_getpages(ap)
vm_page_deactivate(m);
vm_page_wakeup(m);
} else {
vnode_pager_freepage(m);
vm_page_free(m);
}
}
}

View File

@ -143,7 +143,7 @@ nfs_getpages(ap)
/* vm_page_zero_invalid(m, TRUE); */
for (i = 0; i < npages; ++i) {
if (i != ap->a_reqpage)
vnode_pager_freepage(pages[i]);
vm_page_free(pages[i]);
}
return(0);
}
@ -177,7 +177,7 @@ nfs_getpages(ap)
printf("nfs_getpages: error %d\n", error);
for (i = 0; i < npages; ++i) {
if (i != ap->a_reqpage)
vnode_pager_freepage(pages[i]);
vm_page_free(pages[i]);
}
return VM_PAGER_ERROR;
}
@ -233,7 +233,7 @@ nfs_getpages(ap)
vm_page_deactivate(m);
vm_page_wakeup(m);
} else {
vnode_pager_freepage(m);
vm_page_free(m);
}
}
}

View File

@ -143,7 +143,7 @@ nfs_getpages(ap)
/* vm_page_zero_invalid(m, TRUE); */
for (i = 0; i < npages; ++i) {
if (i != ap->a_reqpage)
vnode_pager_freepage(pages[i]);
vm_page_free(pages[i]);
}
return(0);
}
@ -177,7 +177,7 @@ nfs_getpages(ap)
printf("nfs_getpages: error %d\n", error);
for (i = 0; i < npages; ++i) {
if (i != ap->a_reqpage)
vnode_pager_freepage(pages[i]);
vm_page_free(pages[i]);
}
return VM_PAGER_ERROR;
}
@ -233,7 +233,7 @@ nfs_getpages(ap)
vm_page_deactivate(m);
vm_page_wakeup(m);
} else {
vnode_pager_freepage(m);
vm_page_free(m);
}
}
}

View File

@ -445,7 +445,7 @@ nwfs_getpages(ap)
printf("nwfs_getpages: error %d\n",error);
for (i = 0; i < npages; i++) {
if (ap->a_reqpage != i)
vnode_pager_freepage(pages[i]);
vm_page_free(pages[i]);
}
return VM_PAGER_ERROR;
}
@ -487,7 +487,7 @@ nwfs_getpages(ap)
vm_page_deactivate(m);
vm_page_wakeup(m);
} else {
vnode_pager_freepage(m);
vm_page_free(m);
}
}
}

View File

@ -330,13 +330,6 @@ vnode_pager_setsize(vp, nsize)
object->size = nobjsize;
}
void
vnode_pager_freepage(m)
vm_page_t m;
{
vm_page_free(m);
}
/*
* calculate the linear (byte) disk address of specified virtual
* file address
@ -626,7 +619,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
if (VOP_BMAP(vp, 0, &dp, 0, NULL, NULL)) {
for (i = 0; i < count; i++) {
if (i != reqpage) {
vnode_pager_freepage(m[i]);
vm_page_free(m[i]);
}
}
cnt.v_vnodein++;
@ -642,7 +635,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
(vp->v_mount->mnt_stat.f_type != nfs_mount_type)) {
for (i = 0; i < count; i++) {
if (i != reqpage) {
vnode_pager_freepage(m[i]);
vm_page_free(m[i]);
}
}
cnt.v_vnodein++;
@ -659,7 +652,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
if (m[reqpage]->valid == VM_PAGE_BITS_ALL) {
for (i = 0; i < count; i++) {
if (i != reqpage)
vnode_pager_freepage(m[i]);
vm_page_free(m[i]);
}
return VM_PAGER_OK;
}
@ -687,7 +680,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
(u_long)(u_int32_t)
object->un_pager.vnp.vnp_size);
}
vnode_pager_freepage(m[i]);
vm_page_free(m[i]);
runend = i + 1;
first = runend;
continue;
@ -696,12 +689,12 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
if (runend <= reqpage) {
int j;
for (j = i; j < runend; j++) {
vnode_pager_freepage(m[j]);
vm_page_free(m[j]);
}
} else {
if (runpg < (count - first)) {
for (i = first + runpg; i < count; i++)
vnode_pager_freepage(m[i]);
vm_page_free(m[i]);
count = first + runpg;
}
break;
@ -845,7 +838,7 @@ vnode_pager_generic_getpages(vp, m, bytecount, reqpage)
vm_page_deactivate(mt);
vm_page_wakeup(mt);
} else {
vnode_pager_freepage(mt);
vm_page_free(mt);
}
}
}

View File

@ -44,7 +44,6 @@
#ifdef _KERNEL
vm_object_t vnode_pager_alloc __P((void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t));
void vnode_pager_freepage __P((vm_page_t m));
struct vnode *vnode_pager_lock __P((vm_object_t));
/*