- /*
- * Handle "..": two special cases.
- * 1. If at root directory (e.g. after chroot)
- * then ignore it so can't get out.
- * 2. If this vnode is the root of a mounted
- * filesystem, then replace it with the
- * vnode which was mounted on so we take the
- * .. in the other file system.
- */
-#if 0
- /* This shouldn't happen because rename throws out .. */
- /* NEEDSWORK: what to do about this? */
- if (cnp->cn_flags & ISDOTDOT) {
- for (;;) {
- if (dp == ndp->ni_rootdir) {
- ndp->ni_dvp = dp;
- ndp->ni_vp = dp;
- VREF(dp);
- goto nextname;
- }
- if ((dp->v_flag & VROOT) == 0 ||
- (cnp->cn_flags & NOCROSSMOUNT))
- break;
- tdp = dp;
- dp = dp->v_mount->mnt_vnodecovered;
- vput(tdp);
- VREF(dp);
- VOP_LOCK(dp);
- }
- }
-#endif