remove the allocstorage param from makepage - not needed

This commit is contained in:
pooka 2007-08-07 19:40:17 +00:00
parent 9c9c8d3668
commit 44eee227b6
3 changed files with 10 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: genfs.c,v 1.4 2007/08/07 19:37:05 pooka Exp $ */
/* $NetBSD: genfs.c,v 1.5 2007/08/07 19:40:17 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -166,7 +166,7 @@ genfs_getpages(void *v)
pg = rumpvm_findpage(&vp->v_uobj, curoff + bufoff);
printf("got page %p (off 0x%x)\n", pg, (int)(curoff+bufoff));
if (pg == NULL) {
pg = rumpvm_makepage(&vp->v_uobj, curoff + bufoff, 1);
pg = rumpvm_makepage(&vp->v_uobj, curoff + bufoff);
memcpy((void *)pg->uanon, tmpbuf+bufoff, PAGE_SIZE);
RUMPVM_CLEANPAGE(pg);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: rump.h,v 1.3 2007/08/07 19:37:05 pooka Exp $ */
/* $NetBSD: rump.h,v 1.4 2007/08/07 19:40:17 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -73,7 +73,7 @@ void rump_fakeblk_deregister(const char *);
void rumpvm_init(void);
struct vm_page *rumpvm_findpage(struct uvm_object *, voff_t);
struct vm_page *rumpvm_makepage(struct uvm_object *, voff_t, int);
struct vm_page *rumpvm_makepage(struct uvm_object *, voff_t);
void rumpvm_freepage(struct vm_page *);
#define RUMPVM_CLEANPAGE(page) \

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm.c,v 1.5 2007/08/07 19:37:05 pooka Exp $ */
/* $NetBSD: vm.c,v 1.6 2007/08/07 19:40:17 pooka Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -90,7 +90,7 @@ rumpvm_findpage(struct uvm_object *uobj, voff_t off)
}
struct vm_page *
rumpvm_makepage(struct uvm_object *uobj, voff_t off, int allocstorage)
rumpvm_makepage(struct uvm_object *uobj, voff_t off)
{
struct vm_page *pg;
@ -100,11 +100,9 @@ rumpvm_makepage(struct uvm_object *uobj, voff_t off, int allocstorage)
pg->offset = off;
pg->uobject = uobj;
if (allocstorage) {
pg->uanon = (void *)rumpuser_malloc(PAGE_SIZE, 0);
memset((void *)pg->uanon, 0, PAGE_SIZE);
pg->flags = PG_CLEAN;
}
pg->uanon = (void *)rumpuser_malloc(PAGE_SIZE, 0);
memset((void *)pg->uanon, 0, PAGE_SIZE);
pg->flags = PG_CLEAN;
return pg;
}
@ -184,7 +182,7 @@ ao_get(struct uvm_object *uobj, voff_t off, struct vm_page **pgs,
if (pg) {
pgs[i] = pg;
} else {
pg = rumpvm_makepage(uobj, off + (i << PAGE_SHIFT), 1);
pg = rumpvm_makepage(uobj, off + (i << PAGE_SHIFT));
pgs[i] = pg;
}
}