diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index cd0fa2cd1eb8..2e55b007b506 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -845,13 +845,12 @@ spl_vn_fini(void) leaked++; } - kmem_cache_destroy(vn_file_cache); - vn_file_cache = NULL; spin_unlock(&vn_file_lock); if (leaked > 0) SWARN("Warning %d files leaked\n", leaked); + kmem_cache_destroy(vn_file_cache); kmem_cache_destroy(vn_cache); SEXIT;