]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dlm: be sure we reset all nodes at forced shutdown
authorAlexander Aring <aahringo@redhat.com>
Tue, 10 Oct 2023 22:04:46 +0000 (18:04 -0400)
committerDavid Teigland <teigland@redhat.com>
Thu, 12 Oct 2023 20:20:48 +0000 (15:20 -0500)
In case we running in a force shutdown in either midcomms or lowcomms
implementation we will make sure we reset all per midcomms node
information.

Fixes: 63e711b08160 ("fs: dlm: create midcomms nodes when configure")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/midcomms.c

index 4ad71e97cec2a0e053cc7f5362f05fb859b3974f..6bc8d7f89b2cc663c6c7ba0e73273bd4f3851831 100644 (file)
@@ -1405,10 +1405,16 @@ void dlm_midcomms_shutdown(void)
                        midcomms_shutdown(node);
                }
        }
-       srcu_read_unlock(&nodes_srcu, idx);
-       mutex_unlock(&close_lock);
 
        dlm_lowcomms_shutdown();
+
+       for (i = 0; i < CONN_HASH_SIZE; i++) {
+               hlist_for_each_entry_rcu(node, &node_hash[i], hlist) {
+                       midcomms_node_reset(node);
+               }
+       }
+       srcu_read_unlock(&nodes_srcu, idx);
+       mutex_unlock(&close_lock);
 }
 
 int dlm_midcomms_close(int nodeid)