diff options
author | Alexander Aring <aahringo@redhat.com> | 2022-04-04 16:06:46 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-04-06 14:03:01 -0500 |
commit | 2c3fa6ae4d520d59727dac33a3e14d42f3dd36d8 (patch) | |
tree | c4ddab6fb85656e2274f910aaf476a151273a8e0 /fs/dlm/midcomms.c | |
parent | 401597485cfc702ee75c4dc73345dcfcdb002d04 (diff) | |
download | linux-2c3fa6ae4d520d59727dac33a3e14d42f3dd36d8.tar.gz |
dlm: check required context while close
This patch adds a WARN_ON() check to validate the right context while
dlm_midcomms_close() is called. Even before commit 489d8e559c65
("fs: dlm: add reliable connection if reconnect") in this context
dlm_lowcomms_close() flushes all ongoing transmission triggered by dlm
application stack. If we do that, it's required that no new message will
be triggered by the dlm application stack. The function
dlm_midcomms_close() is not called often so we can check if all
lockspaces are in such context.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/midcomms.c')
-rw-r--r-- | fs/dlm/midcomms.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c index 649efe120eee1..6489bc22ad617 100644 --- a/fs/dlm/midcomms.c +++ b/fs/dlm/midcomms.c @@ -135,6 +135,7 @@ #include <net/tcp.h> #include "dlm_internal.h" +#include "lockspace.h" #include "lowcomms.h" #include "config.h" #include "memory.h" @@ -1412,6 +1413,8 @@ int dlm_midcomms_close(int nodeid) if (nodeid == dlm_our_nodeid()) return 0; + dlm_stop_lockspaces_check(); + idx = srcu_read_lock(&nodes_srcu); /* Abort pending close/remove operation */ node = nodeid2node(nodeid, 0); |