Lock vnode using cn_lkflags in case the caller wants the vnode to be
shared-locked.
This commit is contained in:
parent
fa150c55a8
commit
c228d77c51
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user