From a0fc370456f5e778bc996db2d1d2b32f39286b45 Mon Sep 17 00:00:00 2001 From: pooka Date: Tue, 9 Jan 2007 18:01:05 +0000 Subject: [PATCH] in vfs_sync flush page cache only for vnodes with dirty pages, not for vnodes with pages (dirty or otherwise) --- sys/fs/puffs/puffs_vfsops.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/fs/puffs/puffs_vfsops.c b/sys/fs/puffs/puffs_vfsops.c index a663fb122259..e6519619a91c 100644 --- a/sys/fs/puffs/puffs_vfsops.c +++ b/sys/fs/puffs/puffs_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vfsops.c,v 1.18 2007/01/07 19:28:48 pooka Exp $ */ +/* $NetBSD: puffs_vfsops.c,v 1.19 2007/01/09 18:01:05 pooka Exp $ */ /* * Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.18 2007/01/07 19:28:48 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.19 2007/01/09 18:01:05 pooka Exp $"); #include #include @@ -422,8 +422,7 @@ puffs_sync(struct mount *mp, int waitfor, struct kauth_cred *cred, simple_lock(&vp->v_interlock); nvp = TAILQ_NEXT(vp, v_mntvnodes); - /* XXX: this doesn't really work */ - if (vp->v_type != VREG || vp->v_uobj.uo_npages == 0) { + if (vp->v_type != VREG || UVM_OBJ_IS_CLEAN(&vp->v_uobj)) { simple_unlock(&vp->v_interlock); continue; }