Unverified Commit b1e44cdc authored by Ryan Moeller's avatar Ryan Moeller Committed by GitHub
Browse files

FreeBSD: Initialize/destroy zp->z_lock

zp->z_lock is used in shared code for protecting projid and scantime.
We don't exercise these paths much if at all on FreeBSD, so have been
lucky enough not to have issues with the uninitialized locks so far.
Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: default avatarAlexander Motin <mav@FreeBSD.org>
Signed-off-by: default avatarRyan Moeller <ryan@ixsystems.com>
Closes #12003
parent 1f77b587
......@@ -143,6 +143,7 @@ zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
mutex_init(&zp->z_lock, NULL, MUTEX_DEFAULT, NULL);
mutex_init(&zp->z_acl_lock, NULL, MUTEX_DEFAULT, NULL);
zfs_rangelock_init(&zp->z_rangelock, zfs_rangelock_cb, zp);
......@@ -161,6 +162,7 @@ zfs_znode_cache_destructor(void *buf, void *arg)
ASSERT3P(zp->z_vnode, ==, NULL);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment