diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2005-03-28 09:38:20 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2005-03-28 09:38:20 +0000 |
commit | 6a8e9ba4fca05cedcb2b0b25b1f25e650425c3cb (patch) | |
tree | aaff82b08e474803ebcdcb32fd4a02ef11c6b1d2 /sys/gnu | |
parent | fbc822ae3a41f99d603ee8feb3a261c827dbec4c (diff) | |
download | src-6a8e9ba4fca05cedcb2b0b25b1f25e650425c3cb.tar.gz src-6a8e9ba4fca05cedcb2b0b25b1f25e650425c3cb.zip |
- ext2fs_lookup() is no longer responsible for unlocking the dvp, this is
handled in vfs_lookup.c. This code was missing PDIRUNLOCK use prior
to the removal of PDIRUNLOCK in rev 1.73 of vfs_lookup.c.
Sponsored by: Isilon Systems, Inc.
Notes
Notes:
svn path=/head/; revision=144211
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/ext2fs/ext2_lookup.c | 17 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_lookup.c | 17 |
2 files changed, 2 insertions, 32 deletions
diff --git a/sys/gnu/ext2fs/ext2_lookup.c b/sys/gnu/ext2fs/ext2_lookup.c index d1b17c485524..ec39d02728f6 100644 --- a/sys/gnu/ext2fs/ext2_lookup.c +++ b/sys/gnu/ext2fs/ext2_lookup.c @@ -312,8 +312,7 @@ ext2_lookup(ap) struct vnode *tdp; /* returned by VFS_VGET */ doff_t enduseful; /* pointer past last used dir slot */ u_long bmask; /* block offset mask */ - int lockparent; /* 1 => lockparent flag is set */ - int wantparent; /* 1 => wantparent or lockparent flag */ + int wantparent; /* 1 => wantparent flag */ int namlen, error; struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; @@ -329,7 +328,6 @@ ext2_lookup(ap) *vpp = NULL; vdp = ap->a_dvp; dp = VTOI(vdp); - lockparent = flags & LOCKPARENT; wantparent = flags & (LOCKPARENT|WANTPARENT); /* @@ -539,8 +537,6 @@ searchloop: * information cannot be used. */ cnp->cn_flags |= SAVENAME; - if (!lockparent) - VOP_UNLOCK(vdp, 0, td); return (EJUSTRETURN); } /* @@ -618,8 +614,6 @@ found: return (EPERM); } *vpp = tdp; - if (!lockparent) - VOP_UNLOCK(vdp, 0, td); return (0); } @@ -644,8 +638,6 @@ found: return (error); *vpp = tdp; cnp->cn_flags |= SAVENAME; - if (!lockparent) - VOP_UNLOCK(vdp, 0, td); return (0); } @@ -676,11 +668,6 @@ found: vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, td); return (error); } - if (lockparent && (flags & ISLASTCN) && - (error = vn_lock(pdp, LK_EXCLUSIVE, td))) { - vput(tdp); - return (error); - } *vpp = tdp; } else if (dp->i_number == dp->i_ino) { VREF(vdp); /* we want ourself, ie "." */ @@ -689,8 +676,6 @@ found: if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, LK_EXCLUSIVE, &tdp)) != 0) return (error); - if (!lockparent || !(flags & ISLASTCN)) - VOP_UNLOCK(pdp, 0, td); *vpp = tdp; } diff --git a/sys/gnu/fs/ext2fs/ext2_lookup.c b/sys/gnu/fs/ext2fs/ext2_lookup.c index d1b17c485524..ec39d02728f6 100644 --- a/sys/gnu/fs/ext2fs/ext2_lookup.c +++ b/sys/gnu/fs/ext2fs/ext2_lookup.c @@ -312,8 +312,7 @@ ext2_lookup(ap) struct vnode *tdp; /* returned by VFS_VGET */ doff_t enduseful; /* pointer past last used dir slot */ u_long bmask; /* block offset mask */ - int lockparent; /* 1 => lockparent flag is set */ - int wantparent; /* 1 => wantparent or lockparent flag */ + int wantparent; /* 1 => wantparent flag */ int namlen, error; struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; @@ -329,7 +328,6 @@ ext2_lookup(ap) *vpp = NULL; vdp = ap->a_dvp; dp = VTOI(vdp); - lockparent = flags & LOCKPARENT; wantparent = flags & (LOCKPARENT|WANTPARENT); /* @@ -539,8 +537,6 @@ searchloop: * information cannot be used. */ cnp->cn_flags |= SAVENAME; - if (!lockparent) - VOP_UNLOCK(vdp, 0, td); return (EJUSTRETURN); } /* @@ -618,8 +614,6 @@ found: return (EPERM); } *vpp = tdp; - if (!lockparent) - VOP_UNLOCK(vdp, 0, td); return (0); } @@ -644,8 +638,6 @@ found: return (error); *vpp = tdp; cnp->cn_flags |= SAVENAME; - if (!lockparent) - VOP_UNLOCK(vdp, 0, td); return (0); } @@ -676,11 +668,6 @@ found: vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, td); return (error); } - if (lockparent && (flags & ISLASTCN) && - (error = vn_lock(pdp, LK_EXCLUSIVE, td))) { - vput(tdp); - return (error); - } *vpp = tdp; } else if (dp->i_number == dp->i_ino) { VREF(vdp); /* we want ourself, ie "." */ @@ -689,8 +676,6 @@ found: if ((error = VFS_VGET(vdp->v_mount, dp->i_ino, LK_EXCLUSIVE, &tdp)) != 0) return (error); - if (!lockparent || !(flags & ISLASTCN)) - VOP_UNLOCK(pdp, 0, td); *vpp = tdp; } |