diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-29 16:29:40 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-01 10:47:43 +0200 |
commit | 460c9a862a2717ebcaa4fb9b744326b2f06de38f (patch) | |
tree | 9a0c7e9aef2f25a89732d94b9fda2db6f8097deb /drivers/staging/lustre/lustre/lov | |
parent | d0202661d86b3907a3c01123e8ba28fc534bb414 (diff) |
staging: lustre: remove ldebugfs_add_simple() wrapper
It was only being called in one place, and is an unneeded wrapper
function around debugfs_create_file() so just call the real debugfs
function instead. This ends up cleaning up some unneeded error handling
logic that was never needed as well.
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: Quentin Bouget <quentin.bouget@cea.fr>
Cc: Ben Evans <bevans@cray.com>
Cc: NeilBrown <neilb@suse.com>
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Arushi Singhal <arushisinghal19971997@gmail.com>
Cc: Dafna Hirschfeld <dafna3@gmail.com>
Cc: Mathias Rav <mathiasrav@gmail.com>
Cc: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Cc: lustre-devel@lists.lustre.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/lov')
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_pool.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_pool.c b/drivers/staging/lustre/lustre/lov/lov_pool.c index 6d2dec9266b6..9ce7038c9b0e 100644 --- a/drivers/staging/lustre/lustre/lov/lov_pool.c +++ b/drivers/staging/lustre/lustre/lov/lov_pool.c @@ -80,7 +80,6 @@ void lov_pool_putref(struct pool_desc *pool) CDEBUG(D_INFO, "pool %p\n", pool); if (atomic_dec_and_test(&pool->pool_refcount)) { LASSERT(list_empty(&pool->pool_list)); - LASSERT(!pool->pool_debugfs_entry); lov_ost_pool_free(&pool->pool_obds); kfree_rcu(pool, rcu); } @@ -377,18 +376,11 @@ int lov_pool_new(struct obd_device *obd, char *poolname) /* get ref for debugfs file */ lov_pool_getref(new_pool); - new_pool->pool_debugfs_entry = ldebugfs_add_simple( + + new_pool->pool_debugfs_entry = debugfs_create_file(poolname, 0444, lov->lov_pool_debugfs_entry, - poolname, new_pool, + new_pool, &pool_proc_operations); - if (IS_ERR_OR_NULL(new_pool->pool_debugfs_entry)) { - CWARN("Cannot add debugfs pool entry " LOV_POOLNAMEF "\n", - poolname); - new_pool->pool_debugfs_entry = NULL; - lov_pool_putref(new_pool); - } - CDEBUG(D_INFO, "pool %p - proc %p\n", - new_pool, new_pool->pool_debugfs_entry); spin_lock(&obd->obd_dev_lock); list_add_tail(&new_pool->pool_list, &lov->lov_pool_list); @@ -443,11 +435,8 @@ int lov_pool_del(struct obd_device *obd, char *poolname) if (!pool) return -ENOENT; - if (!IS_ERR_OR_NULL(pool->pool_debugfs_entry)) { - CDEBUG(D_INFO, "proc entry %p\n", pool->pool_debugfs_entry); - ldebugfs_remove(&pool->pool_debugfs_entry); - lov_pool_putref(pool); - } + ldebugfs_remove(&pool->pool_debugfs_entry); + lov_pool_putref(pool); spin_lock(&obd->obd_dev_lock); list_del_init(&pool->pool_list); |