vfs_lookup.c (48b05c3f8217016d464c5cd6dc8e61de1f8eda9c) | vfs_lookup.c (59d4932531aa4e97f68b2d42290a68cae6b17375) |
---|---|
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. --- 674 unchanged lines hidden (view full) --- 683 vfslocked = VFS_LOCK_GIANT(dp->v_mount); 684 685 /* 686 * Check to see if the vnode has been mounted on; 687 * if so find the root of the mounted filesystem. 688 */ 689 while (dp->v_type == VDIR && (mp = dp->v_mountedhere) && 690 (cnp->cn_flags & NOCROSSMOUNT) == 0) { | 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. --- 674 unchanged lines hidden (view full) --- 683 vfslocked = VFS_LOCK_GIANT(dp->v_mount); 684 685 /* 686 * Check to see if the vnode has been mounted on; 687 * if so find the root of the mounted filesystem. 688 */ 689 while (dp->v_type == VDIR && (mp = dp->v_mountedhere) && 690 (cnp->cn_flags & NOCROSSMOUNT) == 0) { |
691 if (vfs_busy(mp, 0, 0, td)) | 691 if (vfs_busy(mp, 0, 0)) |
692 continue; 693 vput(dp); 694 VFS_UNLOCK_GIANT(vfslocked); 695 vfslocked = VFS_LOCK_GIANT(mp); 696 if (dp != ndp->ni_dvp) 697 vput(ndp->ni_dvp); 698 else 699 vrele(ndp->ni_dvp); 700 VFS_UNLOCK_GIANT(dvfslocked); 701 dvfslocked = 0; 702 vref(vp_crossmp); 703 ndp->ni_dvp = vp_crossmp; 704 error = VFS_ROOT(mp, compute_cn_lkflags(mp, cnp->cn_lkflags), &tdp, td); | 692 continue; 693 vput(dp); 694 VFS_UNLOCK_GIANT(vfslocked); 695 vfslocked = VFS_LOCK_GIANT(mp); 696 if (dp != ndp->ni_dvp) 697 vput(ndp->ni_dvp); 698 else 699 vrele(ndp->ni_dvp); 700 VFS_UNLOCK_GIANT(dvfslocked); 701 dvfslocked = 0; 702 vref(vp_crossmp); 703 ndp->ni_dvp = vp_crossmp; 704 error = VFS_ROOT(mp, compute_cn_lkflags(mp, cnp->cn_lkflags), &tdp, td); |
705 vfs_unbusy(mp, td); | 705 vfs_unbusy(mp); |
706 if (vn_lock(vp_crossmp, LK_SHARED | LK_NOWAIT)) 707 panic("vp_crossmp exclusively locked or reclaimed"); 708 if (error) { 709 dpunlocked = 1; 710 goto bad2; 711 } 712 ndp->ni_vp = dp = tdp; 713 } --- 426 unchanged lines hidden --- | 706 if (vn_lock(vp_crossmp, LK_SHARED | LK_NOWAIT)) 707 panic("vp_crossmp exclusively locked or reclaimed"); 708 if (error) { 709 dpunlocked = 1; 710 goto bad2; 711 } 712 ndp->ni_vp = dp = tdp; 713 } --- 426 unchanged lines hidden --- |