staging/lustre/ldlm: Remove ldlm_namespace_free()
authorOleg Drokin <green@linuxhacker.ru>
Thu, 1 Oct 2015 04:12:28 +0000 (00:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2015 09:17:19 +0000 (11:17 +0200)
It was directly used only on the server. Client side part
was split into smaller chunks to avoid deadlocks.

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

index cc5ad4c1ff6512540dc65c6d31b963ef4d6132d6..4d81e73fc862eccfe00ab517fbe25c938274fd5a 100644 (file)
@@ -1236,8 +1236,6 @@ ldlm_namespace_new(struct obd_device *obd, char *name,
                   ldlm_side_t client, ldlm_appetite_t apt,
                   ldlm_ns_type_t ns_type);
 int ldlm_namespace_cleanup(struct ldlm_namespace *ns, __u64 flags);
-void ldlm_namespace_free(struct ldlm_namespace *ns,
-                        struct obd_import *imp, int force);
 void ldlm_namespace_register(struct ldlm_namespace *ns, ldlm_side_t client);
 void ldlm_namespace_unregister(struct ldlm_namespace *ns, ldlm_side_t client);
 void ldlm_namespace_get(struct ldlm_namespace *ns);
index dac2ec2180c336611d86bec9019f07dd21851a07..cd65efe72819ad15a883fb37d1287f6abeecb8cc 100644 (file)
@@ -948,33 +948,6 @@ void ldlm_namespace_free_post(struct ldlm_namespace *ns)
        ldlm_put_ref();
 }
 
-/**
- * Cleanup the resource, and free namespace.
- * bug 12864:
- * Deadlock issue:
- * proc1: destroy import
- *     class_disconnect_export(grab cl_sem) ->
- *           -> ldlm_namespace_free ->
- *           -> ldebugfs_remove(grab _lprocfs_lock).
- * proc2: read proc info
- *     lprocfs_fops_read(grab _lprocfs_lock) ->
- *           -> osc_rd_active, etc(grab cl_sem).
- *
- * So that I have to split the ldlm_namespace_free into two parts - the first
- * part ldlm_namespace_free_prior is used to cleanup the resource which is
- * being used; the 2nd part ldlm_namespace_free_post is used to unregister the
- * lprocfs entries, and then free memory. It will be called w/o cli->cl_sem
- * held.
- */
-void ldlm_namespace_free(struct ldlm_namespace *ns,
-                        struct obd_import *imp,
-                        int force)
-{
-       ldlm_namespace_free_prior(ns, imp, force);
-       ldlm_namespace_free_post(ns);
-}
-EXPORT_SYMBOL(ldlm_namespace_free);
-
 void ldlm_namespace_get(struct ldlm_namespace *ns)
 {
        atomic_inc(&ns->ns_bref);