- Lock vnode with flags passed in as argument in zfs_vget() and zfs_root().
Pointed out by: ups Also reported by: kris - Add comments where I'm not sure if LK_RETRY should be used.
This commit is contained in:
parent
e6d0ea1022
commit
6de6bff649
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169194
@ -666,7 +666,7 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t **vpp, kthread_t *td)
|
||||
error = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp);
|
||||
if (error == 0) {
|
||||
*vpp = ZTOV(rootzp);
|
||||
error = vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
error = vn_lock(*vpp, flags, td);
|
||||
(*vpp)->v_vflag |= VV_ROOT;
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int flags, vnode_t **vpp)
|
||||
*vpp = NULL;
|
||||
else {
|
||||
*vpp = ZTOV(zp);
|
||||
vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, curthread);
|
||||
vn_lock(*vpp, flags, curthread);
|
||||
}
|
||||
ZFS_EXIT(zfsvfs);
|
||||
return (0);
|
||||
@ -832,6 +832,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp)
|
||||
VN_HOLD(*vpp);
|
||||
}
|
||||
ZFS_EXIT(zfsvfs);
|
||||
/* XXX: LK_RETRY? */
|
||||
vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
return (0);
|
||||
}
|
||||
@ -854,6 +855,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp)
|
||||
}
|
||||
|
||||
*vpp = ZTOV(zp);
|
||||
/* XXX: LK_RETRY? */
|
||||
vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
vnode_create_vobject(*vpp, zp->z_phys->zp_size, td);
|
||||
ZFS_EXIT(zfsvfs);
|
||||
|
@ -666,7 +666,7 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t **vpp, kthread_t *td)
|
||||
error = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp);
|
||||
if (error == 0) {
|
||||
*vpp = ZTOV(rootzp);
|
||||
error = vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
error = vn_lock(*vpp, flags, td);
|
||||
(*vpp)->v_vflag |= VV_ROOT;
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int flags, vnode_t **vpp)
|
||||
*vpp = NULL;
|
||||
else {
|
||||
*vpp = ZTOV(zp);
|
||||
vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, curthread);
|
||||
vn_lock(*vpp, flags, curthread);
|
||||
}
|
||||
ZFS_EXIT(zfsvfs);
|
||||
return (0);
|
||||
@ -832,6 +832,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp)
|
||||
VN_HOLD(*vpp);
|
||||
}
|
||||
ZFS_EXIT(zfsvfs);
|
||||
/* XXX: LK_RETRY? */
|
||||
vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
return (0);
|
||||
}
|
||||
@ -854,6 +855,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp)
|
||||
}
|
||||
|
||||
*vpp = ZTOV(zp);
|
||||
/* XXX: LK_RETRY? */
|
||||
vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY, td);
|
||||
vnode_create_vobject(*vpp, zp->z_phys->zp_size, td);
|
||||
ZFS_EXIT(zfsvfs);
|
||||
|
Loading…
Reference in New Issue
Block a user