Module Name: src Committed By: dholland Date: Mon Apr 11 01:38:10 UTC 2011
Modified Files: src/sys/kern: vfs_lookup.c Log Message: ZZmsg To generate a diff of this commit: cvs rdiff -u -r1.139 -r1.140 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.139 src/sys/kern/vfs_lookup.c:1.140 --- src/sys/kern/vfs_lookup.c:1.139 Mon Apr 11 01:37:43 2011 +++ src/sys/kern/vfs_lookup.c Mon Apr 11 01:38:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lookup.c,v 1.139 2011/04/11 01:37:43 dholland Exp $ */ +/* $NetBSD: vfs_lookup.c,v 1.140 2011/04/11 01:38:10 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.139 2011/04/11 01:37:43 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.140 2011/04/11 01:38:10 dholland Exp $"); #include "opt_magiclinks.h" @@ -593,9 +593,11 @@ * appropriate. */ static int -namei_start(struct namei_state *state, struct vnode *forcecwd) +namei_start(struct namei_state *state, struct vnode *forcecwd, + struct vnode **startdir_ret) { struct nameidata *ndp = state->ndp; + struct vnode *startdir; /* length includes null terminator (was originally from copyinstr) */ ndp->ni_pathlen = strlen(ndp->ni_pnbuf) + 1; @@ -612,16 +614,16 @@ /* Get starting directory, set up root, and ktrace. */ if (forcecwd != NULL) { - state->namei_startdir = namei_getstartdir_for_nfsd(state, - forcecwd); + startdir = namei_getstartdir_for_nfsd(state, forcecwd); /* no ktrace */ } else { - state->namei_startdir = namei_getstartdir(state); + startdir = namei_getstartdir(state); namei_ktrace(state); } - vn_lock(state->namei_startdir, LK_EXCLUSIVE | LK_RETRY); + vn_lock(startdir, LK_EXCLUSIVE | LK_RETRY); + *startdir_ret = startdir; return 0; } @@ -1044,7 +1046,7 @@ const char *cp; int error; - error = namei_start(state, forcecwd); + error = namei_start(state, forcecwd, &state->namei_startdir); if (error) { return error; }