Lock vnode using cn_lkflags in case the caller wants the vnode to be

shared-locked.
This commit is contained in:
pjd 2007-05-02 00:39:52 +00:00
parent fa150c55a8
commit c228d77c51
2 changed files with 2 additions and 2 deletions

View File

@ -1111,7 +1111,7 @@ 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);
error = vn_lock(*vpp, LK_EXCLUSIVE, td);
error = vn_lock(*vpp, cnp->cn_lkflags, td);
if (cnp->cn_flags & ISDOTDOT)
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td);
if (error != 0) {

View File

@ -1111,7 +1111,7 @@ 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);
error = vn_lock(*vpp, LK_EXCLUSIVE, td);
error = vn_lock(*vpp, cnp->cn_lkflags, td);
if (cnp->cn_flags & ISDOTDOT)
vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td);
if (error != 0) {