aboutsummaryrefslogtreecommitdiffstats
path: root/module/zcommon
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/zcommon
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/zcommon')
-rw-r--r--module/zcommon/zfs_comutil.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/module/zcommon/zfs_comutil.c b/module/zcommon/zfs_comutil.c
index 704ef84c7..52cb7e365 100644
--- a/module/zcommon/zfs_comutil.c
+++ b/module/zcommon/zfs_comutil.c
@@ -226,6 +226,17 @@ zfs_ratelimit_init(zfs_ratelimit_t *rl, unsigned int burst,
}
/*
+ * Finalize rate limit struct
+ *
+ * rl: zfs_ratelimit_t struct
+ */
+void
+zfs_ratelimit_fini(zfs_ratelimit_t *rl)
+{
+ mutex_destroy(&rl->lock);
+}
+
+/*
* Re-implementation of the kernel's __ratelimit() function
*
* We had to write our own rate limiter because the kernel's __ratelimit()
@@ -275,5 +286,6 @@ EXPORT_SYMBOL(zfs_zpl_version_map);
EXPORT_SYMBOL(zfs_spa_version_map);
EXPORT_SYMBOL(zfs_history_event_names);
EXPORT_SYMBOL(zfs_ratelimit_init);
+EXPORT_SYMBOL(zfs_ratelimit_fini);
EXPORT_SYMBOL(zfs_ratelimit);
#endif