Code which uses pages fetched by the pager needs PGO_SYNCIO for
obvious reasons.
This commit is contained in:
parent
119d5d24b7
commit
054e6b6e93
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vm_vfs.c,v 1.13 2009/10/18 00:41:09 pooka Exp $ */
|
||||
/* $NetBSD: vm_vfs.c,v 1.14 2009/11/10 16:55:12 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.13 2009/10/18 00:41:09 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_vfs.c,v 1.14 2009/11/10 16:55:12 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
|
@ -96,7 +96,8 @@ uvm_vnp_zerorange(struct vnode *vp, off_t off, size_t len)
|
|||
npages = MIN(maxpages, round_page(len) >> PAGE_SHIFT);
|
||||
memset(pgs, 0, npages * sizeof(struct vm_page *));
|
||||
mutex_enter(&uobj->vmobjlock);
|
||||
rv = uobj->pgops->pgo_get(uobj, off, pgs, &npages, 0, 0, 0, 0);
|
||||
rv = uobj->pgops->pgo_get(uobj, off, pgs, &npages, 0,
|
||||
VM_PROT_READ | VM_PROT_WRITE, 0, PGO_SYNCIO);
|
||||
KASSERT(npages > 0);
|
||||
|
||||
for (i = 0; i < npages; i++) {
|
||||
|
|
Loading…
Reference in New Issue