diff --git a/sys/fs/union/union_vnops.c b/sys/fs/union/union_vnops.c index 95a83b66ec41..fe4e87ab5a5c 100644 --- a/sys/fs/union/union_vnops.c +++ b/sys/fs/union/union_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: union_vnops.c,v 1.19 2007/02/04 15:03:20 chs Exp $ */ +/* $NetBSD: union_vnops.c,v 1.20 2007/04/16 05:14:54 chs Exp $ */ /* * Copyright (c) 1992, 1993, 1994, 1995 @@ -72,7 +72,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.19 2007/02/04 15:03:20 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.20 2007/04/16 05:14:54 chs Exp $"); #include #include @@ -2024,6 +2024,9 @@ union_putpages(v) ap->a_vp = OTHERVP(vp); simple_unlock(&vp->v_interlock); + if (ap->a_flags & PGO_RECLAIM) { + return 0; + } simple_lock(&ap->a_vp->v_interlock); error = VCALL(ap->a_vp, VOFFSET(vop_putpages), ap); return error; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7c80f6c334cc..f1168a0f8d0e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_subr.c,v 1.286 2007/04/08 11:20:43 hannken Exp $ */ +/* $NetBSD: vfs_subr.c,v 1.287 2007/04/16 05:14:54 chs Exp $ */ /*- * Copyright (c) 1997, 1998, 2004, 2005 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.286 2007/04/08 11:20:43 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.287 2007/04/16 05:14:54 chs Exp $"); #include "opt_inet.h" #include "opt_ddb.h" @@ -696,7 +696,7 @@ vinvalbuf(struct vnode *vp, int flags, kauth_cred_t cred, struct lwp *l, struct buf *bp, *nbp; int s, error; int flushflags = PGO_ALLPAGES | PGO_FREE | PGO_SYNCIO | - (flags & V_SAVE ? PGO_CLEANIT : 0); + (flags & V_SAVE ? PGO_CLEANIT | PGO_RECLAIM : 0); /* XXXUBC this doesn't look at flags or slp* */ simple_lock(&vp->v_interlock); diff --git a/sys/miscfs/genfs/layer_vnops.c b/sys/miscfs/genfs/layer_vnops.c index da0ffcd3a3e0..5e7eda4f18c0 100644 --- a/sys/miscfs/genfs/layer_vnops.c +++ b/sys/miscfs/genfs/layer_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: layer_vnops.c,v 1.29 2006/12/09 16:11:52 chs Exp $ */ +/* $NetBSD: layer_vnops.c,v 1.30 2007/04/16 05:14:54 chs Exp $ */ /* * Copyright (c) 1999 National Aeronautics & Space Administration @@ -67,8 +67,8 @@ * * Ancestors: * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 - * $Id: layer_vnops.c,v 1.29 2006/12/09 16:11:52 chs Exp $ - * $Id: layer_vnops.c,v 1.29 2006/12/09 16:11:52 chs Exp $ + * $Id: layer_vnops.c,v 1.30 2007/04/16 05:14:54 chs Exp $ + * $Id: layer_vnops.c,v 1.30 2007/04/16 05:14:54 chs Exp $ * ...and... * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project */ @@ -233,7 +233,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: layer_vnops.c,v 1.29 2006/12/09 16:11:52 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: layer_vnops.c,v 1.30 2007/04/16 05:14:54 chs Exp $"); #include #include @@ -995,6 +995,9 @@ layer_putpages(v) ap->a_vp = LAYERVPTOLOWERVP(vp); simple_unlock(&vp->v_interlock); + if (ap->a_flags & PGO_RECLAIM) { + return 0; + } simple_lock(&ap->a_vp->v_interlock); error = VCALL(ap->a_vp, VOFFSET(vop_putpages), ap); return error; diff --git a/sys/uvm/uvm_pager.h b/sys/uvm/uvm_pager.h index 5c2217c241f4..bb920baf3482 100644 --- a/sys/uvm/uvm_pager.h +++ b/sys/uvm/uvm_pager.h @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pager.h,v 1.34 2006/02/22 22:28:18 drochner Exp $ */ +/* $NetBSD: uvm_pager.h,v 1.35 2007/04/16 05:14:54 chs Exp $ */ /* * @@ -162,6 +162,7 @@ struct uvm_pagerops { #define PGO_PASTEOF 0x400 /* allow allocation of pages past EOF */ #define PGO_NOBLOCKALLOC 0x800 /* backing block allocation is not needed */ #define PGO_NOTIMESTAMP 0x1000 /* don't mark object accessed/modified */ +#define PGO_RECLAIM 0x2000 /* object is being reclaimed */ /* page we are not interested in getting */ #define PGO_DONTCARE ((struct vm_page *) -1L) /* [get only] */