diff options
author | jeff <jeff@FreeBSD.org> | 2005-03-28 09:40:59 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-03-28 09:40:59 +0000 |
commit | 527fc2c9cc9d94af8d2010ec66bdcabf69ebfe9b (patch) | |
tree | 9fe155b75914fda758f2264e27f14ad1e8743c4a /sys/fs/hpfs | |
parent | 0e1fcdd3a6c038ed0df22310b0e33c1bf4ec128c (diff) | |
download | FreeBSD-src-527fc2c9cc9d94af8d2010ec66bdcabf69ebfe9b.zip FreeBSD-src-527fc2c9cc9d94af8d2010ec66bdcabf69ebfe9b.tar.gz |
- 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.
Diffstat (limited to 'sys/fs/hpfs')
-rw-r--r-- | sys/fs/hpfs/hpfs_vnops.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sys/fs/hpfs/hpfs_vnops.c b/sys/fs/hpfs/hpfs_vnops.c index c5db8b8..909e057 100644 --- a/sys/fs/hpfs/hpfs_vnops.c +++ b/sys/fs/hpfs/hpfs_vnops.c @@ -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))) |