diff options
author | Brian Behlendorf <[email protected]> | 2013-07-10 15:04:07 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-07-10 15:08:22 -0700 |
commit | ab4e74cc38359a1e909febe31e8440a2908bd10e (patch) | |
tree | fa80214eb77adc13ab41dd3aa9844f4644dbac85 /module/spl/spl-kmem.c | |
parent | b1424adda53eba1b6342aab4547330acc6d783fd (diff) |
Fix bogus kmem leak warning
Commit 5c7a036 correctly relocated the creation of a taskq
and the registraction of the kmem_cache_shrinker after the
initialization of the kmem tracking code. However, the
cleanup of these structures was not done before the leak
checks in spl_kmem_fini(). This resulted in an incorrect
'kmem leaked' warning even though there was no actual leak.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes zfsonlinux/zfs#1569
Diffstat (limited to 'module/spl/spl-kmem.c')
-rw-r--r-- | module/spl/spl-kmem.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c index f982ed0ad..8547fa74f 100644 --- a/module/spl/spl-kmem.c +++ b/module/spl/spl-kmem.c @@ -2439,6 +2439,11 @@ spl_kmem_init(void) void spl_kmem_fini(void) { + SENTRY; + + spl_unregister_shrinker(&spl_kmem_cache_shrinker); + taskq_destroy(spl_kmem_cache_taskq); + #ifdef DEBUG_KMEM /* Display all unreclaimed memory addresses, including the * allocation size and the first few bytes of what's located @@ -2458,10 +2463,6 @@ spl_kmem_fini(void) spl_kmem_fini_tracking(&kmem_list, &kmem_lock); spl_kmem_fini_tracking(&vmem_list, &vmem_lock); #endif /* DEBUG_KMEM */ - SENTRY; - - spl_unregister_shrinker(&spl_kmem_cache_shrinker); - taskq_destroy(spl_kmem_cache_taskq); SEXIT; } |