mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
ocfs2: further debugfs cleanups
There is no need to check return value of debugfs_create functions, but the last sweep through ocfs missed a number of places where this was happening. There is also no need to save the individual dentries for the debugfs files, as everything is can just be removed at once when the directory is removed. By getting rid of the file dentries for the debugfs entries, a bit of local memory can be saved as well. [colin.king@canonical.com: ensure ret is set to zero before returning] Link: http://lkml.kernel.org/r/20190807121929.28918-1-colin.king@canonical.com Link: http://lkml.kernel.org/r/20190731132119.GA12603@kroah.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Jia Guo <guojia12@huawei.com> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
963abb9aeb
commit
5e7a3ed9f1
@@ -387,7 +387,6 @@ static void dlm_destroy_dlm_worker(struct dlm_ctxt *dlm)
|
||||
static void dlm_complete_dlm_shutdown(struct dlm_ctxt *dlm)
|
||||
{
|
||||
dlm_unregister_domain_handlers(dlm);
|
||||
dlm_debug_shutdown(dlm);
|
||||
dlm_complete_thread(dlm);
|
||||
dlm_complete_recovery_thread(dlm);
|
||||
dlm_destroy_dlm_worker(dlm);
|
||||
@@ -1938,7 +1937,6 @@ bail:
|
||||
|
||||
if (status) {
|
||||
dlm_unregister_domain_handlers(dlm);
|
||||
dlm_debug_shutdown(dlm);
|
||||
dlm_complete_thread(dlm);
|
||||
dlm_complete_recovery_thread(dlm);
|
||||
dlm_destroy_dlm_worker(dlm);
|
||||
@@ -1992,9 +1990,7 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain,
|
||||
dlm->key = key;
|
||||
dlm->node_num = o2nm_this_node();
|
||||
|
||||
ret = dlm_create_debugfs_subroot(dlm);
|
||||
if (ret < 0)
|
||||
goto leave;
|
||||
dlm_create_debugfs_subroot(dlm);
|
||||
|
||||
spin_lock_init(&dlm->spinlock);
|
||||
spin_lock_init(&dlm->master_lock);
|
||||
@@ -2056,6 +2052,7 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain,
|
||||
mlog(0, "context init: refcount %u\n",
|
||||
kref_read(&dlm->dlm_refs));
|
||||
|
||||
ret = 0;
|
||||
leave:
|
||||
if (ret < 0 && dlm) {
|
||||
if (dlm->master_hash)
|
||||
|
||||
Reference in New Issue
Block a user