Source-Changes-HG archive

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

[src/trunk]: src/sys/kern description:



details:   https://anonhg.NetBSD.org/src/rev/db76e6736d30
branches:  trunk
changeset: 764067:db76e6736d30
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon Apr 11 02:14:57 2011 +0000

description:
description:
vref new vnodes before vrele'ing old vnodes, just in case.

diffstat:

 sys/kern/vfs_lookup.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 7d31f3a67c2c -r db76e6736d30 sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c     Mon Apr 11 02:13:22 2011 +0000
+++ b/sys/kern/vfs_lookup.c     Mon Apr 11 02:14:57 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_lookup.c,v 1.152 2011/04/11 02:13:22 dholland Exp $        */
+/*     $NetBSD: vfs_lookup.c,v 1.153 2011/04/11 02:14:57 dholland Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.152 2011/04/11 02:13:22 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.153 2011/04/11 02:14:57 dholland Exp $");
 
 #include "opt_magiclinks.h"
 
@@ -910,8 +910,8 @@
                                break;
                        tdp = searchdir;
                        searchdir = searchdir->v_mount->mnt_vnodecovered;
+                       vref(searchdir);
                        vput(tdp);
-                       vref(searchdir);
                        vn_lock(searchdir, LK_EXCLUSIVE | LK_RETRY);
                }
        }
@@ -936,8 +936,8 @@
                    (searchdir->v_mount->mnt_flag & MNT_UNION)) {
                        tdp = searchdir;
                        searchdir = searchdir->v_mount->mnt_vnodecovered;
+                       vref(searchdir);
                        vput(tdp);
-                       vref(searchdir);
                        vn_lock(searchdir, LK_EXCLUSIVE | LK_RETRY);
                        goto unionlookup;
                }



Home | Main Index | Thread Index | Old Index