vfs_lookup.c (e3043798aa79660648a80166c1b48461668c4887) vfs_lookup.c (411455a8fbcfbb51e60fb5f5d4a02d6e76c0a88c)
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.

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

716 }
717 /*
718 * If we're looking up the last component and we need an exclusive
719 * lock, adjust our lkflags.
720 */
721 if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags))
722 cnp->cn_lkflags = LK_EXCLUSIVE;
723#ifdef NAMEI_DIAGNOSTIC
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.

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

716 }
717 /*
718 * If we're looking up the last component and we need an exclusive
719 * lock, adjust our lkflags.
720 */
721 if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags))
722 cnp->cn_lkflags = LK_EXCLUSIVE;
723#ifdef NAMEI_DIAGNOSTIC
724 vprint("lookup in", dp);
724 vn_printf(dp, "lookup in ");
725#endif
726 lkflags_save = cnp->cn_lkflags;
727 cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags,
728 cnp->cn_flags);
729 error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp);
730 cnp->cn_lkflags = lkflags_save;
731 if (error != 0) {
732 KASSERT(ndp->ni_vp == NULL, ("leaf should be empty"));

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

1002
1003 if (cnp->cn_flags & ISDOTDOT)
1004 panic ("relookup: lookup on dot-dot");
1005
1006 /*
1007 * We now have a segment name to search for, and a directory to search.
1008 */
1009#ifdef NAMEI_DIAGNOSTIC
725#endif
726 lkflags_save = cnp->cn_lkflags;
727 cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags,
728 cnp->cn_flags);
729 error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp);
730 cnp->cn_lkflags = lkflags_save;
731 if (error != 0) {
732 KASSERT(ndp->ni_vp == NULL, ("leaf should be empty"));

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

1002
1003 if (cnp->cn_flags & ISDOTDOT)
1004 panic ("relookup: lookup on dot-dot");
1005
1006 /*
1007 * We now have a segment name to search for, and a directory to search.
1008 */
1009#ifdef NAMEI_DIAGNOSTIC
1010 vprint("search in:", dp);
1010 vn_printf(dp, "search in ");
1011#endif
1012 if ((error = VOP_LOOKUP(dp, vpp, cnp)) != 0) {
1013 KASSERT(*vpp == NULL, ("leaf should be empty"));
1014 if (error != EJUSTRETURN)
1015 goto bad;
1016 /*
1017 * If creating and at end of pathname, then can consider
1018 * allowing file to be created.

--- 248 unchanged lines hidden ---
1011#endif
1012 if ((error = VOP_LOOKUP(dp, vpp, cnp)) != 0) {
1013 KASSERT(*vpp == NULL, ("leaf should be empty"));
1014 if (error != EJUSTRETURN)
1015 goto bad;
1016 /*
1017 * If creating and at end of pathname, then can consider
1018 * allowing file to be created.

--- 248 unchanged lines hidden ---