Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpvfs Call the pager with page-aligned of...



details:   https://anonhg.NetBSD.org/src/rev/42a331f982f6
branches:  trunk
changeset: 747903:42a331f982f6
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Oct 05 09:11:29 2009 +0000

description:
Call the pager with page-aligned offsets, 'cause that's what the
pager expects.  Fixes KASSERT failure if someone manages to do
otherwise.

diffstat:

 sys/rump/librump/rumpvfs/vm_vfs.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 10f114f75133 -r 42a331f982f6 sys/rump/librump/rumpvfs/vm_vfs.c
--- a/sys/rump/librump/rumpvfs/vm_vfs.c Mon Oct 05 09:09:29 2009 +0000
+++ b/sys/rump/librump/rumpvfs/vm_vfs.c Mon Oct 05 09:11:29 2009 +0000
@@ -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;
 



Home | Main Index | Thread Index | Old Index