aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorGvozden Neskovic <[email protected]>2016-11-26 21:30:44 +0100
committerBrian Behlendorf <[email protected]>2017-05-04 19:26:28 -0400
commitc17486b2178fc545c50d48effd4be47d33208933 (patch)
tree82f82e4b72863f3096efd7e7db84aaec3f4b8757 /module/zfs
parent8fa5250f5d779e577406c581fc2d7fbf0baceea5 (diff)
Add missing *_destroy/*_fini calls
The proposed debugging enhancements in zfsonlinux/spl#587 identified the following missing *_destroy/*_fini calls. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Gvozden Neskovic <[email protected]> Closes #5428
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/dmu_objset.c1
-rw-r--r--module/zfs/dsl_deadlist.c2
-rw-r--r--module/zfs/dsl_pool.c1
-rw-r--r--module/zfs/vdev.c3
-rw-r--r--module/zfs/zap.c2
-rw-r--r--module/zfs/zap_micro.c3
-rw-r--r--module/zfs/zfs_znode.c2
7 files changed, 11 insertions, 3 deletions
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c
index 43de05c50..946e4602f 100644
--- a/module/zfs/dmu_objset.c
+++ b/module/zfs/dmu_objset.c
@@ -846,6 +846,7 @@ dmu_objset_evict_done(objset_t *os)
mutex_destroy(&os->os_userused_lock);
mutex_destroy(&os->os_obj_lock);
mutex_destroy(&os->os_user_ptr_lock);
+ mutex_destroy(&os->os_upgrade_lock);
for (int i = 0; i < TXG_SIZE; i++) {
multilist_destroy(os->os_dirty_dnodes[i]);
}
diff --git a/module/zfs/dsl_deadlist.c b/module/zfs/dsl_deadlist.c
index e7046b786..258e626fa 100644
--- a/module/zfs/dsl_deadlist.c
+++ b/module/zfs/dsl_deadlist.c
@@ -120,6 +120,7 @@ dsl_deadlist_close(dsl_deadlist_t *dl)
dsl_deadlist_entry_t *dle;
dl->dl_os = NULL;
+ mutex_destroy(&dl->dl_lock);
if (dl->dl_oldfmt) {
dl->dl_oldfmt = B_FALSE;
@@ -136,7 +137,6 @@ dsl_deadlist_close(dsl_deadlist_t *dl)
avl_destroy(&dl->dl_tree);
}
dmu_buf_rele(dl->dl_dbuf, dl);
- mutex_destroy(&dl->dl_lock);
dl->dl_dbuf = NULL;
dl->dl_phys = NULL;
}
diff --git a/module/zfs/dsl_pool.c b/module/zfs/dsl_pool.c
index eb3e6eeb3..c98938f3c 100644
--- a/module/zfs/dsl_pool.c
+++ b/module/zfs/dsl_pool.c
@@ -348,6 +348,7 @@ dsl_pool_close(dsl_pool_t *dp)
rrw_destroy(&dp->dp_config_rwlock);
mutex_destroy(&dp->dp_lock);
+ cv_destroy(&dp->dp_spaceavail_cv);
taskq_destroy(dp->dp_iput_taskq);
if (dp->dp_blkstats)
vmem_free(dp->dp_blkstats, sizeof (zfs_all_blkstats_t));
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c
index dfb1ef522..3b2ba8e25 100644
--- a/module/zfs/vdev.c
+++ b/module/zfs/vdev.c
@@ -710,6 +710,9 @@ vdev_free(vdev_t *vd)
mutex_destroy(&vd->vdev_stat_lock);
mutex_destroy(&vd->vdev_probe_lock);
+ zfs_ratelimit_fini(&vd->vdev_delay_rl);
+ zfs_ratelimit_fini(&vd->vdev_checksum_rl);
+
if (vd == spa->spa_root_vdev)
spa->spa_root_vdev = NULL;
diff --git a/module/zfs/zap.c b/module/zfs/zap.c
index 435278c6e..ee9962bff 100644
--- a/module/zfs/zap.c
+++ b/module/zfs/zap.c
@@ -84,7 +84,7 @@ fzap_upgrade(zap_t *zap, dmu_tx_t *tx, zap_flags_t flags)
zap->zap_dbu.dbu_evict_func_sync = zap_evict_sync;
zap->zap_dbu.dbu_evict_func_async = NULL;
- mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0);
+ mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, MUTEX_DEFAULT, 0);
zap->zap_f.zap_block_shift = highbit64(zap->zap_dbuf->db_size) - 1;
zp = zap_f_phys(zap);
diff --git a/module/zfs/zap_micro.c b/module/zfs/zap_micro.c
index 28c80e549..2cb9f42ae 100644
--- a/module/zfs/zap_micro.c
+++ b/module/zfs/zap_micro.c
@@ -404,7 +404,8 @@ mzap_open(objset_t *os, uint64_t obj, dmu_buf_t *db)
zap->zap_dbuf = db;
if (zap_block_type != ZBT_MICRO) {
- mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, 0, 0);
+ mutex_init(&zap->zap_f.zap_num_entries_mtx, 0, MUTEX_DEFAULT,
+ 0);
zap->zap_f.zap_block_shift = highbit64(db->db_size) - 1;
if (zap_block_type != ZBT_HEADER || zap_magic != ZAP_MAGIC) {
winner = NULL; /* No actual winner here... */
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
index 93437afb3..522621668 100644
--- a/module/zfs/zfs_znode.c
+++ b/module/zfs/zfs_znode.c
@@ -1913,6 +1913,8 @@ zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx)
mutex_destroy(&zfsvfs->z_hold_locks[i]);
}
+ mutex_destroy(&zfsvfs->z_znodes_lock);
+
vmem_free(zfsvfs->z_hold_trees, sizeof (avl_tree_t) * size);
vmem_free(zfsvfs->z_hold_locks, sizeof (kmutex_t) * size);
kmem_free(sb, sizeof (struct super_block));