diff options
author | Alexander Aring <aahringo@redhat.com> | 2022-11-18 01:11:46 +0300 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-11-21 18:45:49 +0300 |
commit | 8b0188b0d60b6f6183b48380bac49fe080c5ded9 (patch) | |
tree | 5bee3dbb2b73b03bb5e4f44828dc55b2d25c3c09 /fs/dlm/lowcomms.c | |
parent | 17827754e503d6c72b05a1c4603469ec9bf35d48 (diff) | |
download | linux-8b0188b0d60b6f6183b48380bac49fe080c5ded9.tar.xz |
fs: dlm: add midcomms init/start functions
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>
Diffstat (limited to 'fs/dlm/lowcomms.c')
-rw-r--r-- | fs/dlm/lowcomms.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index b05c6d9b5102..0dcb69cc456a 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1987,10 +1987,6 @@ static const struct dlm_proto_ops dlm_sctp_ops = { int dlm_lowcomms_start(void) { int error = -EINVAL; - int i; - - for (i = 0; i < CONN_HASH_SIZE; i++) - INIT_HLIST_HEAD(&connection_hash[i]); init_local(); if (!dlm_local_count) { @@ -1999,8 +1995,6 @@ int dlm_lowcomms_start(void) goto fail; } - INIT_WORK(&listen_con.rwork, process_listen_recv_socket); - error = work_start(); if (error) goto fail_local; @@ -2039,6 +2033,16 @@ fail: return error; } +void dlm_lowcomms_init(void) +{ + int i; + + for (i = 0; i < CONN_HASH_SIZE; i++) + INIT_HLIST_HEAD(&connection_hash[i]); + + INIT_WORK(&listen_con.rwork, process_listen_recv_socket); +} + void dlm_lowcomms_exit(void) { struct dlm_node_addr *na, *safe; |