diff options
author | Kody A Kantor <kody@kkantor.com> | 2019-04-10 18:28:03 +0000 |
---|---|---|
committer | Kody A Kantor <kody@kkantor.com> | 2019-04-10 18:30:17 +0000 |
commit | a45581b9139c7a97a413f068aef06fe04bdccf6d (patch) | |
tree | 53385e10a3cac7ef39899d72d2cb43f49a472636 | |
parent | d8075b7816cce899d8e5b43d151dd0e44f758855 (diff) | |
download | illumos-joyent-a45581b9139c7a97a413f068aef06fe04bdccf6d.tar.gz |
OS-7709 metaslab load/unload counter kstats leak memory
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r-- | usr/src/uts/common/fs/zfs/metaslab.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/metaslab.c b/usr/src/uts/common/fs/zfs/metaslab.c index bcc705ac9e..98e1c7b98f 100644 --- a/usr/src/uts/common/fs/zfs/metaslab.c +++ b/usr/src/uts/common/fs/zfs/metaslab.c @@ -23,6 +23,7 @@ * Copyright (c) 2011, 2018 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2019 Joyent, Inc. */ #include <sys/zfs_context.h> @@ -850,7 +851,10 @@ metaslab_group_passivate(metaslab_group_t *mg) mg->mg_next = NULL; if (mg->mg_kstat != NULL) { + metaslab_group_kstat_t *data = mg->mg_kstat->ks_data; + kstat_delete(mg->mg_kstat); + kmem_free(data, sizeof (metaslab_group_kstat_t)); } mutex_destroy(&mg->mg_kstat_lock); } |