diff options
author | jeff <jeff@FreeBSD.org> | 2005-03-28 09:31:57 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-03-28 09:31:57 +0000 |
commit | 0afa18e58f0050e8bf00de7ba60dd9a366b273b5 (patch) | |
tree | a40a18e4033ed57fee171012f0cb641ef28fb938 /sys/fs/udf | |
parent | 5f8bc80203c1f09224b3147185dc75b9836efa82 (diff) | |
download | FreeBSD-src-0afa18e58f0050e8bf00de7ba60dd9a366b273b5.zip FreeBSD-src-0afa18e58f0050e8bf00de7ba60dd9a366b273b5.tar.gz |
- 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.
Diffstat (limited to 'sys/fs/udf')
-rw-r--r-- | sys/fs/udf/udf_vnops.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index 00d1b71..c7ff99a 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -911,6 +911,8 @@ lookloop: /* 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 @@ lookloop: 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) { |