summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/ldlm
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-29 16:29:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-01 10:47:44 +0200
commitb145d7865a7c9cf61074d5648e6b02e775783ba6 (patch)
treeaec41df1c9a19cca21a4df3b8e00be94c4a4a483 /drivers/staging/lustre/lustre/ldlm
parentd5bf5cf9e150512f04ef8ae7744964b052d2f061 (diff)
downloadop-kernel-dev-b145d7865a7c9cf61074d5648e6b02e775783ba6.zip
op-kernel-dev-b145d7865a7c9cf61074d5648e6b02e775783ba6.tar.gz
staging: lustre: get rid of ldebugfs_remove()
It was just a dumb wrapper around debugfs_remove_recursive() so just call the function properly. Also, there is no need to set the dentry to NULL, it's gone, who cares about it anymore... Cc: Oleg Drokin <oleg.drokin@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: James Simmons <jsimmons@infradead.org> Cc: NeilBrown <neilb@suse.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Roman Storozhenko <romeusmeister@gmail.com> Cc: Aastha Gupta <aastha.gupta4104@gmail.com> Cc: Ben Evans <bevans@cray.com> Cc: Quentin Bouget <quentin.bouget@cea.fr> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com> Cc: Arushi Singhal <arushisinghal19971997@gmail.com> Cc: Patrick Farrell <paf@cray.com> Cc: Aliaksei Karaliou <akaraliou.dev@gmail.com> Cc: Mathias Rav <mathiasrav@gmail.com> Cc: Andriy Skulysh <andriy.skulysh@seagate.com> Cc: Dafna Hirschfeld <dafna3@gmail.com> Cc: "Gustavo A. R. Silva" <garsilva@embeddedor.com> Cc: Bob Glosman <bob.glossman@intel.com> Cc: lustre-devel@lists.lustre.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ldlm')
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_pool.c5
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_resource.c21
2 files changed, 5 insertions, 21 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
index 146b348..36d14ee 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
@@ -640,10 +640,7 @@ static void ldlm_pool_debugfs_fini(struct ldlm_pool *pl)
lprocfs_free_stats(&pl->pl_stats);
pl->pl_stats = NULL;
}
- if (pl->pl_debugfs_entry) {
- ldebugfs_remove(&pl->pl_debugfs_entry);
- pl->pl_debugfs_entry = NULL;
- }
+ debugfs_remove_recursive(pl->pl_debugfs_entry);
}
int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns,
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index 6b94a2b..c93b019 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -121,18 +121,9 @@ void ldlm_debugfs_setup(void)
void ldlm_debugfs_cleanup(void)
{
- if (!IS_ERR_OR_NULL(ldlm_svc_debugfs_dir))
- ldebugfs_remove(&ldlm_svc_debugfs_dir);
-
- if (!IS_ERR_OR_NULL(ldlm_ns_debugfs_dir))
- ldebugfs_remove(&ldlm_ns_debugfs_dir);
-
- if (!IS_ERR_OR_NULL(ldlm_debugfs_dir))
- ldebugfs_remove(&ldlm_debugfs_dir);
-
- ldlm_svc_debugfs_dir = NULL;
- ldlm_ns_debugfs_dir = NULL;
- ldlm_debugfs_dir = NULL;
+ debugfs_remove_recursive(ldlm_svc_debugfs_dir);
+ debugfs_remove_recursive(ldlm_ns_debugfs_dir);
+ debugfs_remove_recursive(ldlm_debugfs_dir);
}
static ssize_t resource_count_show(struct kobject *kobj, struct attribute *attr,
@@ -358,11 +349,7 @@ static struct kobj_type ldlm_ns_ktype = {
static void ldlm_namespace_debugfs_unregister(struct ldlm_namespace *ns)
{
- if (IS_ERR_OR_NULL(ns->ns_debugfs_entry))
- CERROR("dlm namespace %s has no procfs dir?\n",
- ldlm_ns_name(ns));
- else
- ldebugfs_remove(&ns->ns_debugfs_entry);
+ debugfs_remove_recursive(ns->ns_debugfs_entry);
if (ns->ns_stats)
lprocfs_free_stats(&ns->ns_stats);
OpenPOWER on IntegriCloud