udf_vnops.c (144207) | udf_vnops.c (145006) |
---|---|
1/*- 2 * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/fs/udf/udf_vnops.c 144207 2005-03-28 09:31:57Z jeff $ | 26 * $FreeBSD: head/sys/fs/udf/udf_vnops.c 145006 2005-04-13 10:59:09Z jeff $ |
27 */ 28 29/* udf_vnops.c */ 30/* Take care of the vnode side of things */ 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/namei.h> --- 874 unchanged lines hidden (view full) --- 909 return (error); 910 } 911 912 /* Did we have a match? */ 913 if (id) { 914 if (flags & ISDOTDOT) 915 VOP_UNLOCK(dvp, 0, a->a_cnp->cn_thread); 916 error = udf_vget(udfmp->im_mountp, id, LK_EXCLUSIVE, &tdp); | 27 */ 28 29/* udf_vnops.c */ 30/* Take care of the vnode side of things */ 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/namei.h> --- 874 unchanged lines hidden (view full) --- 909 return (error); 910 } 911 912 /* Did we have a match? */ 913 if (id) { 914 if (flags & ISDOTDOT) 915 VOP_UNLOCK(dvp, 0, a->a_cnp->cn_thread); 916 error = udf_vget(udfmp->im_mountp, id, LK_EXCLUSIVE, &tdp); |
917 vn_lock(dvp, LK_EXCLUSIVE|LK_RETRY, a->a_cnp->cn_thread); |
|
917 if (!error) { 918 /* 919 * Remember where this entry was if it's the final 920 * component. 921 */ 922 if ((flags & ISLASTCN) && nameiop == LOOKUP) 923 node->diroff = ds->offset + ds->off; 924 if (numdirpasses == 2) 925 nchstats.ncs_pass2++; 926 *vpp = tdp; 927 /* Put this entry in the cache */ 928 if (flags & MAKEENTRY) 929 cache_enter(dvp, *vpp, a->a_cnp); | 918 if (!error) { 919 /* 920 * Remember where this entry was if it's the final 921 * component. 922 */ 923 if ((flags & ISLASTCN) && nameiop == LOOKUP) 924 node->diroff = ds->offset + ds->off; 925 if (numdirpasses == 2) 926 nchstats.ncs_pass2++; 927 *vpp = tdp; 928 /* Put this entry in the cache */ 929 if (flags & MAKEENTRY) 930 cache_enter(dvp, *vpp, a->a_cnp); |
930 } else if (flags & ISDOTDOT) 931 vn_lock(dvp, LK_EXCLUSIVE|LK_RETRY, 932 a->a_cnp->cn_thread); | 931 } |
933 } else { 934 /* Name wasn't found on this pass. Do another pass? */ 935 if (numdirpasses == 2) { 936 numdirpasses--; 937 offset = 0; 938 udf_closedir(ds); 939 goto lookloop; 940 } --- 215 unchanged lines hidden --- | 932 } else { 933 /* Name wasn't found on this pass. Do another pass? */ 934 if (numdirpasses == 2) { 935 numdirpasses--; 936 offset = 0; 937 udf_closedir(ds); 938 goto lookloop; 939 } --- 215 unchanged lines hidden --- |