staging/lustre/ldlm: Unregister ldlm namespace from sysfs on free
authorOleg Drokin <green@linuxhacker.ru>
Wed, 15 Jul 2015 16:21:16 +0000 (12:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2015 17:12:45 +0000 (10:12 -0700)
ldlm_namespace_sysfs_unregister needs to be called ldlm_namespace_free_post
so that we don't have this dangling object there after the namespace
has disappeared.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c

index cdb6366..4bb3173 100644 (file)
@@ -939,6 +939,7 @@ void ldlm_namespace_free_post(struct ldlm_namespace *ns)
        ldlm_pool_fini(&ns->ns_pool);
 
        ldlm_namespace_debugfs_unregister(ns);
+       ldlm_namespace_sysfs_unregister(ns);
        cfs_hash_putref(ns->ns_rs_hash);
        /* Namespace \a ns should be not on list at this time, otherwise
         * this will cause issues related to using freed \a ns in poold