diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-06 20:23:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-10-06 20:23:17 +0000 |
commit | 85674180ac0b414993bec634994ea51b28390306 (patch) | |
tree | 5ce384dfed739e368b8605fc6db4ed1f26a43609 /sys/msdosfs/msdosfs_lookup.c | |
parent | 44f83f3e77b70fbce9f014e39cf5c97bae700213 (diff) |
back out vfs lite2 till after 2.2
Diffstat (limited to 'sys/msdosfs/msdosfs_lookup.c')
-rw-r--r-- | sys/msdosfs/msdosfs_lookup.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c index 42844deb5e3..2305f74d9b0 100644 --- a/sys/msdosfs/msdosfs_lookup.c +++ b/sys/msdosfs/msdosfs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_lookup.c,v 1.6 1997/10/06 15:22:39 csapuntz Exp $ */ +/* $OpenBSD: msdosfs_lookup.c,v 1.7 1997/10/06 20:20:58 deraadt Exp $ */ /* $NetBSD: msdosfs_lookup.c,v 1.30 1996/10/25 23:14:08 cgd Exp $ */ /*- @@ -89,7 +89,6 @@ msdosfs_lookup(v) struct vnode *vdp = ap->a_dvp; struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; - struct proc *p = cnp->cn_proc; daddr_t bn; int error; int lockparent; @@ -162,14 +161,14 @@ msdosfs_lookup(v) VREF(vdp); error = 0; } else if (flags & ISDOTDOT) { - VOP_UNLOCK(pdp, 0, p); - error = vget(vdp, LK_EXCLUSIVE, p); + VOP_UNLOCK(pdp); + error = vget(vdp, 1); if (!error && lockparent && (flags & ISLASTCN)) - error = vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p); + error = VOP_LOCK(pdp); } else { - error = vget(vdp, LK_EXCLUSIVE, p); + error = vget(vdp, 1); if (!lockparent || error || !(flags & ISLASTCN)) - VOP_UNLOCK(pdp, 0, p); + VOP_UNLOCK(pdp); } /* * Check that the capability number did not change @@ -185,9 +184,9 @@ msdosfs_lookup(v) } vput(vdp); if (lockparent && pdp != vdp && (flags & ISLASTCN)) - VOP_UNLOCK(pdp, 0, p); + VOP_UNLOCK(pdp); } - if ((error = vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p)) != 0) + if ((error = VOP_LOCK(pdp)) != 0) return (error); vdp = pdp; dp = VTODE(vdp); @@ -415,7 +414,7 @@ notfound:; */ cnp->cn_flags |= SAVENAME; if (!lockparent) - VOP_UNLOCK(vdp, 0, p); + VOP_UNLOCK(vdp); return (EJUSTRETURN); } /* @@ -485,7 +484,7 @@ foundroot:; return (error); *vpp = DETOV(tdp); if (!lockparent) - VOP_UNLOCK(vdp, 0, p); + VOP_UNLOCK(vdp); return (0); } @@ -513,7 +512,7 @@ foundroot:; *vpp = DETOV(tdp); cnp->cn_flags |= SAVENAME; if (!lockparent) - VOP_UNLOCK(vdp, 0, p); + VOP_UNLOCK(vdp); return (0); } @@ -538,13 +537,13 @@ foundroot:; */ pdp = vdp; if (flags & ISDOTDOT) { - VOP_UNLOCK(pdp, 0, p); /* race to get the inode */ + VOP_UNLOCK(pdp); /* race to get the inode */ if ((error = deget(pmp, cluster, blkoff, &tdp)) != 0) { - vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p); + VOP_LOCK(pdp); return (error); } if (lockparent && (flags & ISLASTCN) && - (error = vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, p))) { + (error = VOP_LOCK(pdp))) { vput(DETOV(tdp)); return (error); } @@ -556,7 +555,7 @@ foundroot:; if ((error = deget(pmp, cluster, blkoff, &tdp)) != 0) return (error); if (!lockparent || !(flags & ISLASTCN)) - VOP_UNLOCK(pdp, 0, p); + VOP_UNLOCK(pdp); *vpp = DETOV(tdp); } |