Commit b145d786 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d5bf5cf9
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -291,8 +291,7 @@ EXPORT_SYMBOL(seq_client_flush);

static void seq_client_debugfs_fini(struct lu_client_seq *seq)
{
	if (!IS_ERR_OR_NULL(seq->lcs_debugfs_entry))
		ldebugfs_remove(&seq->lcs_debugfs_entry);
	debugfs_remove_recursive(seq->lcs_debugfs_entry);
}

static void seq_client_debugfs_init(struct lu_client_seq *seq)
@@ -399,8 +398,7 @@ static int __init fid_init(void)

static void __exit fid_exit(void)
{
	if (!IS_ERR_OR_NULL(seq_debugfs_dir))
		ldebugfs_remove(&seq_debugfs_dir);
	debugfs_remove_recursive(seq_debugfs_dir);
}

MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");
+2 −4
Original line number Diff line number Diff line
@@ -227,8 +227,7 @@ static void fld_client_debugfs_init(struct lu_client_fld *fld)

void fld_client_debugfs_fini(struct lu_client_fld *fld)
{
	if (!IS_ERR_OR_NULL(fld->lcf_debugfs_entry))
		ldebugfs_remove(&fld->lcf_debugfs_entry);
	debugfs_remove_recursive(fld->lcf_debugfs_entry);
}
EXPORT_SYMBOL(fld_client_debugfs_fini);

@@ -435,8 +434,7 @@ static int __init fld_init(void)

static void __exit fld_exit(void)
{
	if (!IS_ERR_OR_NULL(fld_debugfs_dir))
		ldebugfs_remove(&fld_debugfs_dir);
	debugfs_remove_recursive(fld_debugfs_dir);
}

MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");
+0 −2
Original line number Diff line number Diff line
@@ -453,8 +453,6 @@ extern const struct file_operations lprocfs_stats_seq_fops;
void ldebugfs_add_vars(struct dentry *parent, struct lprocfs_vars *var,
		       void *data);

void ldebugfs_remove(struct dentry **entryp);

int lprocfs_obd_setup(struct obd_device *obd, struct lprocfs_vars *list,
		      const struct attribute_group *attrs);
int lprocfs_obd_cleanup(struct obd_device *obd);
+1 −4
Original line number Diff line number Diff line
@@ -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,
+4 −17
Original line number Diff line number Diff line
@@ -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);
Loading