summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Drokin <green@linuxhacker.ru>2015-07-15 19:21:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-16 20:12:45 +0300
commit9c7e397c98d646a3a23ffd304def1750be916803 (patch)
tree63e5d6fd7413c0516debd576a81c1e40aa177d4f
parent4bdc190a929c6f99732a9a0ff03dba7b0137d4bd (diff)
downloadlinux-9c7e397c98d646a3a23ffd304def1750be916803.tar.xz
staging/lustre/ldlm: Unregister ldlm namespace from sysfs on free
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>
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_resource.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index cdb63665a113..4bb3173bcd5f 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -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