diff options
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/coda/coda_vnops.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c index 389f78bf0224..c8cf74dda4ae 100644 --- a/sys/fs/coda/coda_vnops.c +++ b/sys/fs/coda/coda_vnops.c @@ -996,7 +996,7 @@ coda_lookup(struct vop_lookup_args *ap) * we are ISLASTCN */ if (!error || (error == EJUSTRETURN)) { - if (!(cnp->cn_flags & LOCKPARENT) || !(cnp->cn_flags & ISLASTCN)) { + if (cnp->cn_flags & ISDOTDOT) { if ((error = VOP_UNLOCK(dvp, 0, td))) { return error; } @@ -1006,8 +1006,8 @@ coda_lookup(struct vop_lookup_args *ap) */ if (*ap->a_vpp) { if ((error = VOP_LOCK(*ap->a_vpp, LK_EXCLUSIVE, td))) { - printf("coda_lookup: "); - panic("unlocked parent but couldn't lock child"); + vn_lock(dvp, LK_RETRY|LK_EXCLUSIVE, td); + return (error); } } } else { @@ -1015,8 +1015,7 @@ coda_lookup(struct vop_lookup_args *ap) if (*ap->a_vpp && (*ap->a_vpp != dvp)) { /* Different, go ahead and lock it. */ if ((error = VOP_LOCK(*ap->a_vpp, LK_EXCLUSIVE, td))) { - printf("coda_lookup: "); - panic("unlocked parent but couldn't lock child"); + return (error); } } } |