init_main.c (fa88511615b024b53c7c2db01bc4ed710e186390) init_main.c (f257b7a54b4fe77840cf694314bdc401e00c31a1)
1/*
2 * Copyright (c) 1995 Terrence R. Lambert
3 * All rights reserved.
4 *
5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
6 * The Regents of the University of California. All rights reserved.
7 * (c) UNIX System Laboratories, Inc.
8 * All or some portions of this file are derived from material licensed

--- 539 unchanged lines hidden (view full) ---

548 GIANT_REQUIRED;
549
550 td = curthread;
551 p = td->td_proc;
552
553 vfs_mountroot();
554
555 /* Get the vnode for '/'. Set p->p_fd->fd_cdir to reference it. */
1/*
2 * Copyright (c) 1995 Terrence R. Lambert
3 * All rights reserved.
4 *
5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
6 * The Regents of the University of California. All rights reserved.
7 * (c) UNIX System Laboratories, Inc.
8 * All or some portions of this file are derived from material licensed

--- 539 unchanged lines hidden (view full) ---

548 GIANT_REQUIRED;
549
550 td = curthread;
551 p = td->td_proc;
552
553 vfs_mountroot();
554
555 /* Get the vnode for '/'. Set p->p_fd->fd_cdir to reference it. */
556 if (VFS_ROOT(TAILQ_FIRST(&mountlist), &rootvnode))
556 if (VFS_ROOT(TAILQ_FIRST(&mountlist), &rootvnode, td))
557 panic("cannot find root vnode");
558 FILEDESC_LOCK(p->p_fd);
559 p->p_fd->fd_cdir = rootvnode;
560 VREF(p->p_fd->fd_cdir);
561 p->p_fd->fd_rdir = rootvnode;
562 VREF(p->p_fd->fd_rdir);
563 FILEDESC_UNLOCK(p->p_fd);
564 VOP_UNLOCK(rootvnode, 0, td);

--- 169 unchanged lines hidden ---
557 panic("cannot find root vnode");
558 FILEDESC_LOCK(p->p_fd);
559 p->p_fd->fd_cdir = rootvnode;
560 VREF(p->p_fd->fd_cdir);
561 p->p_fd->fd_rdir = rootvnode;
562 VREF(p->p_fd->fd_rdir);
563 FILEDESC_UNLOCK(p->p_fd);
564 VOP_UNLOCK(rootvnode, 0, td);

--- 169 unchanged lines hidden ---