Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Fix getcleanvnode() in previous: in the if (vp->v_u...



details:   https://anonhg.NetBSD.org/src/rev/490a376806f9
branches:  trunk
changeset: 749105:490a376806f9
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Nov 17 22:20:14 2009 +0000

description:
Fix getcleanvnode() in previous: in the if (vp->v_usecount != 0)
case we didn't bump the refcount, so don't decrease it through vrelel().
call mutex_exit() on v_interlock directly instead.

diffstat:

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

diffs (27 lines):

diff -r f98520f04c26 -r 490a376806f9 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Tue Nov 17 21:09:54 2009 +0000
+++ b/sys/kern/vfs_subr.c       Tue Nov 17 22:20:14 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.386 2009/11/05 08:18:02 bouyer Exp $    */
+/*     $NetBSD: vfs_subr.c,v 1.387 2009/11/17 22:20:14 bouyer 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.386 2009/11/05 08:18:02 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.387 2009/11/17 22:20:14 bouyer Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -377,7 +377,7 @@
                 * Don't return to freelist - the holder of the last
                 * reference will destroy it.
                 */
-               vrelel(vp, 0); /* releases vp->v_interlock */
+               mutex_exit(&vp->v_interlock);
                mutex_enter(&vnode_free_list_lock);
                goto retry;
        }



Home | Main Index | Thread Index | Old Index