Skip to content
This repository was archived by the owner on Feb 16, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions usr/src/uts/common/fs/zfs/zfs_znode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,15 @@ zfs_zget_internal(zfsvfs_t *zfsvfs, uint64_t obj_num, znode_t **zpp, int skip_vn
if (zp->z_unlinked) {
err = ENOENT;
} else {
VN_HOLD(ZTOV(zp));
*zpp = zp;
err = 0;
if (vp == NULL && skipvnode == 0)
zfs_attach_vnode(zp);
VN_HOLD(ZTOV(zp));
}
/* no else, since in case skipvnode is != NULL, we must ignore
* any potentially existing vnode. skipvnode != NULL explicitly
* ask us to not touch a vnode. */
*zpp = zp;
err = 0;
}
dmu_buf_rele(db, NULL);
mutex_exit(&zp->z_lock);
Expand Down