summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-28 09:38:20 +0000
committerjeff <jeff@FreeBSD.org>2005-03-28 09:38:20 +0000
commit255c32fd4c4274366d52cd94f89878fce7ed57f4 (patch)
treeaaff82b08e474803ebcdcb32fd4a02ef11c6b1d2 /sys/gnu
parent838e3ffcb148f27a01a42f4ee6fe77cf6fb83fd7 (diff)
downloadFreeBSD-src-255c32fd4c4274366d52cd94f89878fce7ed57f4.zip
FreeBSD-src-255c32fd4c4274366d52cd94f89878fce7ed57f4.tar.gz
- 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.
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_lookup.c17
-rw-r--r--sys/gnu/fs/ext2fs/ext2_lookup.c17
2 files changed, 2 insertions, 32 deletions
diff --git a/sys/gnu/ext2fs/ext2_lookup.c b/sys/gnu/ext2fs/ext2_lookup.c
index d1b17c4..ec39d02 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 d1b17c4..ec39d02 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;
}
OpenPOWER on IntegriCloud