aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs')
-rw-r--r--sys/contrib/openzfs/module/zstd/zfs_zstd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/contrib/openzfs/module/zstd/zfs_zstd.c b/sys/contrib/openzfs/module/zstd/zfs_zstd.c
index 5c896478f970..3d1805f49cca 100644
--- a/sys/contrib/openzfs/module/zstd/zfs_zstd.c
+++ b/sys/contrib/openzfs/module/zstd/zfs_zstd.c
@@ -700,6 +700,13 @@ zstd_mempool_deinit(void)
void
zfs_zstd_cache_reap_now(void)
{
+
+ /*
+ * Short-circuit if there are no buffers to begin with.
+ */
+ if (ZSTDSTAT(zstd_stat_buffers) == 0)
+ return;
+
/*
* calling alloc with zero size seeks
* and releases old unused objects