zfs: zstd: short-circuit cleaning buffers if none exist
This avoids a barrage of locking every minute.
This commit is contained in:
parent
e1b6a7f83f
commit
36639c3942
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user