Module Name: src Committed By: dholland Date: Mon Apr 11 02:12:42 UTC 2011
Modified Files: src/sys/kern: vfs_lookup.c Log Message: description: lookup_once() on success always sets ni_vp to the same thing as the returned foundobj, so do that in the caller instead. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/kern/vfs_lookup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/vfs_lookup.c diff -u src/sys/kern/vfs_lookup.c:1.148 src/sys/kern/vfs_lookup.c:1.149 --- src/sys/kern/vfs_lookup.c:1.148 Mon Apr 11 02:11:32 2011 +++ src/sys/kern/vfs_lookup.c Mon Apr 11 02:12:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lookup.c,v 1.148 2011/04/11 02:11:32 dholland Exp $ */ +/* $NetBSD: vfs_lookup.c,v 1.149 2011/04/11 02:12:42 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.148 2011/04/11 02:11:32 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.149 2011/04/11 02:12:42 dholland Exp $"); #include "opt_magiclinks.h" @@ -892,7 +892,6 @@ foundobj = searchdir; vref(foundobj); ndp->ni_dvp = searchdir; - ndp->ni_vp = foundobj; *foundobj_ret = foundobj; return 0; } @@ -916,7 +915,6 @@ vref(foundobj); vref(foundobj); ndp->ni_dvp = foundobj; - ndp->ni_vp = foundobj; vn_lock(foundobj, LK_EXCLUSIVE | LK_RETRY); *foundobj_ret = foundobj; return 0; @@ -986,7 +984,6 @@ */ state->lookup_alldone = 1; ndp->ni_dvp = searchdir; - ndp->ni_vp = NULL; *foundobj_ret = NULL; return (0); } @@ -1039,7 +1036,6 @@ } ndp->ni_dvp = searchdir; - ndp->ni_vp = foundobj; *foundobj_ret = foundobj; return 0; } @@ -1166,6 +1162,7 @@ state->attempt_retry = 1; return (error); } + ndp->ni_vp = foundobj; // XXX ought to be able to avoid this case too if (state->lookup_alldone) { error = 0; @@ -1459,6 +1456,7 @@ if (error) { goto bad; } + ndp->ni_vp = foundobj; // XXX ought to be able to avoid this case too if (state->lookup_alldone) { /* this should NOT be "goto terminal;" */