diff options
author | pjd <pjd@FreeBSD.org> | 2007-05-01 13:58:56 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-05-01 13:58:56 +0000 |
commit | e1368281617250669e2ed9ff90355b40873c38f1 (patch) | |
tree | c3dad406a8896ecb713e1d37294dd31e963f8c31 /sys/cddl | |
parent | 58504006086ab8dc32db20550e00cd1fa5e26b93 (diff) | |
download | FreeBSD-src-e1368281617250669e2ed9ff90355b40873c38f1.zip FreeBSD-src-e1368281617250669e2ed9ff90355b40873c38f1.tar.gz |
MFp4: Remove LK_RETRY flag when locking vnode in zfs_lookup, we don't want
dead vnodes here.
Suggested by: kib
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index a4174b9..bcf5ca7 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -1109,9 +1109,14 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp, if (error == 0 && (nm[0] != '.' || nm[1] != '\0')) { if (cnp->cn_flags & ISDOTDOT) VOP_UNLOCK(dvp, 0, td); - vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td); + error = vn_lock(*vpp, LK_EXCLUSIVE, td); if (cnp->cn_flags & ISDOTDOT) vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td); + if (error != 0) { + VN_RELE(*vpp); + *vpp = NULL; + return (error); + } } #ifdef FREEBSD_NAMECACHE |