forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/fs/ocfs2/dlm/dlmdomain.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* -*- mode: c; c-basic-offset: 8; -*-
23 * vim: noexpandtab sw=8 ts=8 sts=0:
34 *
....@@ -6,22 +7,6 @@
67 * defines domain join / leave apis
78 *
89 * Copyright (C) 2004 Oracle. All rights reserved.
9
- *
10
- * This program is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU General Public
12
- * License as published by the Free Software Foundation; either
13
- * version 2 of the License, or (at your option) any later version.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
- * General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU General Public
21
- * License along with this program; if not, write to the
22
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23
- * Boston, MA 021110-1307, USA.
24
- *
2510 */
2611
2712 #include <linux/module.h>
....@@ -35,9 +20,9 @@
3520 #include <linux/debugfs.h>
3621 #include <linux/sched/signal.h>
3722
38
-#include "cluster/heartbeat.h"
39
-#include "cluster/nodemanager.h"
40
-#include "cluster/tcp.h"
23
+#include "../cluster/heartbeat.h"
24
+#include "../cluster/nodemanager.h"
25
+#include "../cluster/tcp.h"
4126
4227 #include "dlmapi.h"
4328 #include "dlmcommon.h"
....@@ -45,7 +30,7 @@
4530 #include "dlmdebug.h"
4631
4732 #define MLOG_MASK_PREFIX (ML_DLM|ML_DLM_DOMAIN)
48
-#include "cluster/masklog.h"
33
+#include "../cluster/masklog.h"
4934
5035 /*
5136 * ocfs2 node maps are array of long int, which limits to send them freely
....@@ -402,7 +387,6 @@
402387 static void dlm_complete_dlm_shutdown(struct dlm_ctxt *dlm)
403388 {
404389 dlm_unregister_domain_handlers(dlm);
405
- dlm_debug_shutdown(dlm);
406390 dlm_complete_thread(dlm);
407391 dlm_complete_recovery_thread(dlm);
408392 dlm_destroy_dlm_worker(dlm);
....@@ -1896,11 +1880,7 @@
18961880 goto bail;
18971881 }
18981882
1899
- status = dlm_debug_init(dlm);
1900
- if (status < 0) {
1901
- mlog_errno(status);
1902
- goto bail;
1903
- }
1883
+ dlm_debug_init(dlm);
19041884
19051885 snprintf(wq_name, O2NM_MAX_NAME_LEN, "dlm_wq-%s", dlm->name);
19061886 dlm->dlm_worker = alloc_workqueue(wq_name, WQ_MEM_RECLAIM, 0);
....@@ -1957,7 +1937,6 @@
19571937
19581938 if (status) {
19591939 dlm_unregister_domain_handlers(dlm);
1960
- dlm_debug_shutdown(dlm);
19611940 dlm_complete_thread(dlm);
19621941 dlm_complete_recovery_thread(dlm);
19631942 dlm_destroy_dlm_worker(dlm);
....@@ -2011,9 +1990,7 @@
20111990 dlm->key = key;
20121991 dlm->node_num = o2nm_this_node();
20131992
2014
- ret = dlm_create_debugfs_subroot(dlm);
2015
- if (ret < 0)
2016
- goto leave;
1993
+ dlm_create_debugfs_subroot(dlm);
20171994
20181995 spin_lock_init(&dlm->spinlock);
20191996 spin_lock_init(&dlm->master_lock);
....@@ -2075,6 +2052,7 @@
20752052 mlog(0, "context init: refcount %u\n",
20762053 kref_read(&dlm->dlm_refs));
20772054
2055
+ ret = 0;
20782056 leave:
20792057 if (ret < 0 && dlm) {
20802058 if (dlm->master_hash)
....@@ -2361,9 +2339,7 @@
23612339 goto error;
23622340 }
23632341
2364
- status = dlm_create_debugfs_root();
2365
- if (status)
2366
- goto error;
2342
+ dlm_create_debugfs_root();
23672343
23682344 return 0;
23692345 error: