diff options
author | Jorgen Lundman <lundman@lundman.net> | 2021-07-01 15:22:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-01 15:22:16 +0000 |
commit | eca174527e0b8416550e6ce87c405702fd379ada (patch) | |
tree | 348bb282dac6477661c3981c74951d93841376af | |
parent | 50e09eddd0c556ace90357b081d23df3f00c2d83 (diff) | |
download | src-eca174527e0b8416550e6ce87c405702fd379ada.tar.gz src-eca174527e0b8416550e6ce87c405702fd379ada.zip |
Upstream: dmu_zfetch_stream_fini leaks refcount
dmu_zfetch_stream_fini() is missing calls to destroy the refcounts,
leaking them and the mutex inside.
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Closes #12294
-rw-r--r-- | module/zfs/dmu_zfetch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/dmu_zfetch.c b/module/zfs/dmu_zfetch.c index 4a323fa990fe..a26b0d739921 100644 --- a/module/zfs/dmu_zfetch.c +++ b/module/zfs/dmu_zfetch.c @@ -159,6 +159,8 @@ static void dmu_zfetch_stream_fini(zstream_t *zs) { ASSERT(!list_link_active(&zs->zs_node)); + zfs_refcount_destroy(&zs->zs_callers); + zfs_refcount_destroy(&zs->zs_refs); kmem_free(zs, sizeof (*zs)); } |