summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/zfs/zfs_vfsops.c
diff options
context:
space:
mode:
authorgw25295 <none@none>2007-08-08 15:35:58 -0700
committergw25295 <none@none>2007-08-08 15:35:58 -0700
commitc25056de36a33f2a76f79dcf64593f731d258013 (patch)
tree29406bc39e21ecff22376a2c18f4dd9ea0b51dd2 /usr/src/uts/common/fs/zfs/zfs_vfsops.c
parent74ed3e963b20ba6344270ca5163d3cfb1565c0c6 (diff)
downloadillumos-gate-c25056de36a33f2a76f79dcf64593f731d258013.tar.gz
6584470 zdb needs to initialize the bpl_lock mutex
6583739 libzpool should check for properly initialized mutexes 6548010 unbalanced mutex_init/mutex_destroy issues in zfs 6502263 ZFS needs some more FreeBSD porting love Contributed by Pawel Dawidek 6576827 multiple calls to spa_activate() can end up reinitializing all its mutexes 6576830 certain spa mutexes and condition variables need some love
Diffstat (limited to 'usr/src/uts/common/fs/zfs/zfs_vfsops.c')
-rw-r--r--usr/src/uts/common/fs/zfs/zfs_vfsops.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/zfs_vfsops.c b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
index c36dc9f23a..45eb32ac6d 100644
--- a/usr/src/uts/common/fs/zfs/zfs_vfsops.c
+++ b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
@@ -628,6 +628,10 @@ out:
if (error) {
if (zfsvfs->z_os)
dmu_objset_close(zfsvfs->z_os);
+ mutex_destroy(&zfsvfs->z_znodes_lock);
+ list_destroy(&zfsvfs->z_all_znodes);
+ rw_destroy(&zfsvfs->z_unmount_lock);
+ rw_destroy(&zfsvfs->z_unmount_inactive_lock);
kmem_free(zfsvfs, sizeof (zfsvfs_t));
} else {
atomic_add_32(&zfs_active_fs_count, 1);
@@ -1226,8 +1230,13 @@ static void
zfs_freevfs(vfs_t *vfsp)
{
zfsvfs_t *zfsvfs = vfsp->vfs_data;
+ int i;
+
+ for (i = 0; i != ZFS_OBJ_MTX_SZ; i++)
+ mutex_destroy(&zfsvfs->z_hold_mtx[i]);
mutex_destroy(&zfsvfs->z_znodes_lock);
+ list_destroy(&zfsvfs->z_all_znodes);
rw_destroy(&zfsvfs->z_unmount_lock);
rw_destroy(&zfsvfs->z_unmount_inactive_lock);
kmem_free(zfsvfs, sizeof (zfsvfs_t));