vfs_lookup.c (83366) | vfs_lookup.c (89306) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_lookup.c 8.4 (Berkeley) 2/16/94 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)vfs_lookup.c 8.4 (Berkeley) 2/16/94 |
39 * $FreeBSD: head/sys/kern/vfs_lookup.c 83366 2001-09-12 08:38:13Z julian $ | 39 * $FreeBSD: head/sys/kern/vfs_lookup.c 89306 2002-01-13 11:58:06Z alfred $ |
40 */ 41 42#include "opt_ktrace.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/kernel.h> 47#include <sys/lock.h> --- 91 unchanged lines hidden (view full) --- 139#ifdef KTRACE 140 if (KTRPOINT(p, KTR_NAMEI)) 141 ktrnamei(p->p_tracep, cnp->cn_pnbuf); 142#endif 143 144 /* 145 * Get starting point for the translation. 146 */ | 40 */ 41 42#include "opt_ktrace.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/kernel.h> 47#include <sys/lock.h> --- 91 unchanged lines hidden (view full) --- 139#ifdef KTRACE 140 if (KTRPOINT(p, KTR_NAMEI)) 141 ktrnamei(p->p_tracep, cnp->cn_pnbuf); 142#endif 143 144 /* 145 * Get starting point for the translation. 146 */ |
147 FILEDESC_LOCK(fdp); |
|
147 ndp->ni_rootdir = fdp->fd_rdir; 148 ndp->ni_topdir = fdp->fd_jdir; 149 150 dp = fdp->fd_cdir; 151 VREF(dp); | 148 ndp->ni_rootdir = fdp->fd_rdir; 149 ndp->ni_topdir = fdp->fd_jdir; 150 151 dp = fdp->fd_cdir; 152 VREF(dp); |
153 FILEDESC_UNLOCK(fdp); |
|
152 for (;;) { 153 /* 154 * Check if root directory should replace current directory. 155 * Done at start of translation and after symbolic link. 156 */ 157 cnp->cn_nameptr = cnp->cn_pnbuf; 158 if (*(cnp->cn_nameptr) == '/') { 159 vrele(dp); --- 588 unchanged lines hidden --- | 154 for (;;) { 155 /* 156 * Check if root directory should replace current directory. 157 * Done at start of translation and after symbolic link. 158 */ 159 cnp->cn_nameptr = cnp->cn_pnbuf; 160 if (*(cnp->cn_nameptr) == '/') { 161 vrele(dp); --- 588 unchanged lines hidden --- |