summary refs log tree commit diff
path: root/fs/dlm/main.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2022-11-17 17:11:46 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-17 08:50:18 +0100
commitf78892061075cc289c85137c3b3f3a1a4cf4b956 (patch)
tree0e21b0f756f7c175741f576174d8330dbb71b92f /fs/dlm/main.c
parente7935f5af4261af501296ec80abab02e5f524261 (diff)
downloadlinux-f78892061075cc289c85137c3b3f3a1a4cf4b956.tar.gz
fs: dlm: add midcomms init/start functions
[ Upstream commit 8b0188b0d60b6f6183b48380bac49fe080c5ded9 ]

This patch introduces leftovers of init, start, stop and exit
functionality. The dlm application layer should always call the midcomms
layer which getting aware of such event and redirect it to the lowcomms
layer. Some functionality which is currently handled inside the start
functionality of midcomms and lowcomms should be handled in the init
functionality as it only need to be initialized once when dlm is loaded.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Stable-dep-of: aad633dc0cf9 ("fs: dlm: start midcomms before scand")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/dlm/main.c')
-rw-r--r--fs/dlm/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/dlm/main.c b/fs/dlm/main.c
index 1c5be4b70ac1..a77338be3237 100644
--- a/fs/dlm/main.c
+++ b/fs/dlm/main.c
@@ -17,7 +17,7 @@
 #include "user.h"
 #include "memory.h"
 #include "config.h"
-#include "lowcomms.h"
+#include "midcomms.h"
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/dlm.h>
@@ -30,6 +30,8 @@ static int __init init_dlm(void)
 	if (error)
 		goto out;
 
+	dlm_midcomms_init();
+
 	error = dlm_lockspace_init();
 	if (error)
 		goto out_mem;
@@ -66,6 +68,7 @@ static int __init init_dlm(void)
  out_lockspace:
 	dlm_lockspace_exit();
  out_mem:
+	dlm_midcomms_exit();
 	dlm_memory_exit();
  out:
 	return error;
@@ -79,7 +82,7 @@ static void __exit exit_dlm(void)
 	dlm_config_exit();
 	dlm_memory_exit();
 	dlm_lockspace_exit();
-	dlm_lowcomms_exit();
+	dlm_midcomms_exit();
 	dlm_unregister_debugfs();
 }