- hpfs_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.
This commit is contained in:
Jeff Roberson 2005-03-28 09:40:59 +00:00
parent 4ba88b3d56
commit 7539637508

View File

@ -1030,13 +1030,12 @@ hpfs_lookup(ap)
int error;
int nameiop = cnp->cn_nameiop;
int flags = cnp->cn_flags;
int lockparent = flags & LOCKPARENT;
#if HPFS_DEBUG
int wantparent = flags & (LOCKPARENT|WANTPARENT);
#endif
dprintf(("hpfs_lookup(0x%x, %s, %ld, %d, %d): \n",
dprintf(("hpfs_lookup(0x%x, %s, %ld, %d): \n",
dhp->h_no, cnp->cn_nameptr, cnp->cn_namelen,
lockparent, wantparent));
wantparent));
if (nameiop != CREATE && nameiop != DELETE && nameiop != LOOKUP) {
printf("hpfs_lookup: LOOKUP, DELETE and CREATE are only supported\n");
@ -1065,12 +1064,12 @@ hpfs_lookup(ap)
VOP_UNLOCK(dvp,0,cnp->cn_thread);
error = VFS_VGET(hpmp->hpm_mp,
dhp->h_fn.fn_parent, LK_EXCLUSIVE, ap->a_vpp);
VOP_LOCK(dvp, 0, cnp->cn_thread);
if(error)
if (error) {
vn_lock(dvp, LK_EXCLUSIVE|LK_RETRY,
cnp->cn_thread);
return(error);
}
}
if (!lockparent || !(flags & ISLASTCN))
VOP_UNLOCK(dvp,0,cnp->cn_thread);
return (0);
} else {
struct buf *bp;
@ -1082,8 +1081,6 @@ hpfs_lookup(ap)
if (error) {
if ((error == ENOENT) && (flags & ISLASTCN) &&
(nameiop == CREATE || nameiop == RENAME)) {
if(!lockparent)
VOP_UNLOCK(dvp, 0, cnp->cn_thread);
cnp->cn_flags |= SAVENAME;
return (EJUSTRETURN);
}
@ -1129,8 +1126,6 @@ hpfs_lookup(ap)
brelse(bp);
if(!lockparent || !(flags & ISLASTCN))
VOP_UNLOCK(dvp, 0, cnp->cn_thread);
if ((flags & MAKEENTRY) &&
(!(flags & ISLASTCN) ||
(nameiop != DELETE && nameiop != CREATE)))