Source-Changes-HG archive

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

[src/trunk]: src/sys/kern when allocating a new vnode,



details:   https://anonhg.NetBSD.org/src/rev/fe870855fe18
branches:  trunk
changeset: 551946:fe870855fe18
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sun Sep 14 11:09:48 2003 +0000

description:
when allocating a new vnode,
increment numvnodes before releasing vnode_free_list_slock.

diffstat:

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

diffs (34 lines):

diff -r 80c509267d43 -r fe870855fe18 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Sun Sep 14 10:15:47 2003 +0000
+++ b/sys/kern/vfs_subr.c       Sun Sep 14 11:09:48 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.205 2003/09/11 15:34:26 yamt Exp $      */
+/*     $NetBSD: vfs_subr.c,v 1.206 2003/09/14 11:09:48 yamt Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.205 2003/09/11 15:34:26 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.206 2003/09/14 11:09:48 yamt Exp $");
 
 #include "opt_inet.h"
 #include "opt_ddb.h"
@@ -555,6 +555,7 @@
 
        if (tryalloc &&
            (vp = pool_get(&vnode_pool, PR_NOWAIT)) != NULL) {
+               numvnodes++;
                simple_unlock(&vnode_free_list_slock);
                memset(vp, 0, sizeof(*vp));
                simple_lock_init(&vp->v_interlock);
@@ -562,7 +563,6 @@
                uobj->pgops = &uvm_vnodeops;
                uobj->uo_npages = 0;
                TAILQ_INIT(&uobj->memq);
-               numvnodes++;
        } else {
                vp = getcleanvnode(p);
                /*



Home | Main Index | Thread Index | Old Index