MFp4: Remove LK_RETRY flag when locking vnode in zfs_lookup, we don't want
dead vnodes here. Suggested by: kib
This commit is contained in:
parent
7046601eca
commit
d1d7399da5
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user