- We no longer have to bother with PDIRUNLOCK, lookup() handles it for us.

- In the ISDOTDOT case we have to unlock the dvp before locking the child,
   if this fails we must relock dvp before returning an error.  This was
   missing before.

Sponsored by:	Isilon Systems, Inc.
This commit is contained in:
Jeff Roberson 2005-03-28 09:31:57 +00:00
parent f6576f194e
commit 27ad03cb5d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144207

View File

@ -911,6 +911,8 @@ udf_lookup(struct vop_cachedlookup_args *a)
/* Did we have a match? */
if (id) {
if (flags & ISDOTDOT)
VOP_UNLOCK(dvp, 0, a->a_cnp->cn_thread);
error = udf_vget(udfmp->im_mountp, id, LK_EXCLUSIVE, &tdp);
if (!error) {
/*
@ -921,17 +923,13 @@ udf_lookup(struct vop_cachedlookup_args *a)
node->diroff = ds->offset + ds->off;
if (numdirpasses == 2)
nchstats.ncs_pass2++;
if (!(flags & LOCKPARENT) || !(flags & ISLASTCN)) {
a->a_cnp->cn_flags |= PDIRUNLOCK;
VOP_UNLOCK(dvp, 0, td);
}
*vpp = tdp;
/* Put this entry in the cache */
if (flags & MAKEENTRY)
cache_enter(dvp, *vpp, a->a_cnp);
}
} else if (flags & ISDOTDOT)
vn_lock(dvp, LK_EXCLUSIVE|LK_RETRY,
a->a_cnp->cn_thread);
} else {
/* Name wasn't found on this pass. Do another pass? */
if (numdirpasses == 2) {