Mark pages busy during VOP_PUTPAGES(). Deals with KASSERT in nfs write.

This commit is contained in:
pooka 2008-12-16 14:48:31 +00:00
parent 0be5b3fe22
commit f5ffdf8399
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm.c,v 1.46 2008/12/16 14:07:25 pooka Exp $ */ /* $NetBSD: vm.c,v 1.47 2008/12/16 14:48:31 pooka Exp $ */
/* /*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved. * Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -150,6 +150,7 @@ rumpvm_flushva(struct uvm_object *uobj)
rva_next = LIST_NEXT(rva, entries); rva_next = LIST_NEXT(rva, entries);
if (rva->pg->uobject == uobj) { if (rva->pg->uobject == uobj) {
LIST_REMOVE(rva, entries); LIST_REMOVE(rva, entries);
rva->pg->flags &= ~PG_BUSY;
kmem_free(rva, sizeof(*rva)); kmem_free(rva, sizeof(*rva));
} }
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: genfs_io.c,v 1.3 2008/12/16 14:07:25 pooka Exp $ */ /* $NetBSD: genfs_io.c,v 1.4 2008/12/16 14:48:31 pooka Exp $ */
/* /*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved. * Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -349,7 +349,7 @@ genfs_do_putpages(struct vnode *vp, off_t startoff, off_t endoff, int flags,
memcpy(curva, (void *)pg->uanon, PAGE_SIZE); memcpy(curva, (void *)pg->uanon, PAGE_SIZE);
rumpvm_enterva((vaddr_t)curva, pg); rumpvm_enterva((vaddr_t)curva, pg);
pg->flags |= PG_CLEAN; pg->flags |= PG_CLEAN | PG_BUSY;
} }
KASSERT(curoff > smallest); KASSERT(curoff > smallest);