Module Name: src
Committed By: pooka
Date: Mon Oct 5 09:11:29 UTC 2009
Modified Files:
src/sys/rump/librump/rumpvfs: vm_vfs.c
Log Message:
Call the pager with page-aligned offsets, 'cause that's what the
pager expects. Fixes KASSERT failure if someone manages to do
otherwise.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpvfs/vm_vfs.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/librump/rumpvfs/vm_vfs.c
diff -u src/sys/rump/librump/rumpvfs/vm_vfs.c:1.10 src/sys/rump/librump/rumpvfs/vm_vfs.c:1.11
--- src/sys/rump/librump/rumpvfs/vm_vfs.c:1.10 Wed Aug 5 14:11:57 2009
+++ src/sys/rump/librump/rumpvfs/vm_vfs.c Mon Oct 5 09:11:29 2009
@@ -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 @@
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;