FreeBSD: catch up to 1400077

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes #14328
This commit is contained in:
Mateusz Guzik 2023-01-05 19:56:40 +01:00 committed by GitHub
parent f6f215f07f
commit f25f1f9091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -540,6 +540,9 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz,
* Acquire vnode lock before making it available to the world. * Acquire vnode lock before making it available to the world.
*/ */
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
#if __FreeBSD_version >= 1400077
vn_set_state(vp, VSTATE_CONSTRUCTED);
#endif
VN_LOCK_AREC(vp); VN_LOCK_AREC(vp);
if (vp->v_type != VFIFO) if (vp->v_type != VFIFO)
VN_LOCK_ASHARE(vp); VN_LOCK_ASHARE(vp);