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

shared-locked.
This commit is contained in:
Pawel Jakub Dawidek 2007-05-02 00:39:52 +00:00
parent 04748b1b2e
commit 9167141244
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169197
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) {