Source-Changes-HG archive

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

[src/trunk]: src/sys/kern vclean: fix a bug which makes getcleanvnode always ...



details:   https://anonhg.NetBSD.org/src/rev/5b948358ce34
branches:  trunk
changeset: 758610:5b948358ce34
user:      yamt <yamt%NetBSD.org@localhost>
date:      Thu Nov 11 13:58:58 2010 +0000

description:
vclean: fix a bug which makes getcleanvnode always cause VOP_INACTIVE.

diffstat:

 sys/kern/vfs_subr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a2829cf3a691 -r 5b948358ce34 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Thu Nov 11 11:07:06 2010 +0000
+++ b/sys/kern/vfs_subr.c       Thu Nov 11 13:58:58 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.415 2010/08/17 13:17:47 hannken Exp $   */
+/*     $NetBSD: vfs_subr.c,v 1.416 2010/11/11 13:58:58 yamt Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.415 2010/08/17 13:17:47 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.416 2010/11/11 13:58:58 yamt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -1847,7 +1847,7 @@
                atomic_add_int(&uvmexp.filepages, vp->v_uobj.uo_npages);
        }
        vp->v_iflag &= ~(VI_TEXT|VI_EXECMAP);
-       active = (vp->v_usecount > 1);
+       active = (vp->v_usecount & VC_MASK) > 1;
 
        /* XXXAD should not lock vnode under layer */
        mutex_exit(&vp->v_interlock);



Home | Main Index | Thread Index | Old Index