Call the pager with page-aligned offsets, 'cause that's what the

pager expects.  Fixes KASSERT failure if someone manages to do
otherwise.
This commit is contained in:
pooka 2009-10-05 09:11:29 +00:00
parent cd7abaf063
commit 281623cb29
1 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_vfs.c,v 1.10 2009/08/05 14:11:57 pooka Exp $ */
/* $NetBSD: vm_vfs.c,v 1.11 2009/10/05 09:11:29 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.10 2009/08/05 14:11:57 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.11 2009/10/05 09:11:29 pooka Exp $");
#include <sys/param.h>
@ -167,8 +167,9 @@ ubc_uiomove(struct uvm_object *uobj, struct uio *uio, vsize_t todo,
do {
mutex_enter(&uobj->vmobjlock);
rv = uobj->pgops->pgo_get(uobj, uio->uio_offset, pgs, &npages,
0, VM_PROT_READ | VM_PROT_WRITE, 0, pagerflags);
rv = uobj->pgops->pgo_get(uobj, uio->uio_offset & ~PAGE_MASK,
pgs, &npages, 0, VM_PROT_READ | VM_PROT_WRITE, 0,
pagerflags);
if (rv)
goto out;