aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/lowcomms.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2021-05-21 15:08:36 -0400
committerDavid Teigland <teigland@redhat.com>2021-05-25 09:22:20 -0500
commit7443bc962509912c70c587db71449daff26b9678 (patch)
treedf3c1bfde309f134ae62146004e3c3cb5dcc29b5 /fs/dlm/lowcomms.c
parentb38bc9c2b3171f4411d80015ecb876bc6f9bcd26 (diff)
downloadlinux-7443bc962509912c70c587db71449daff26b9678.tar.gz
fs: dlm: set is othercon flag
There is a is othercon flag which is never used, this patch will set it and printout a warning if the othercon ever sends a dlm message which should never be the case. 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 7c7a31377f273..4944aef24aa59 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -938,6 +938,7 @@ static int accept_from_sock(struct listen_connection *con)
}
lockdep_set_subclass(&othercon->sock_mutex, 1);
+ set_bit(CF_IS_OTHERCON, &othercon->flags);
newcon->othercon = othercon;
} else {
/* close other sock con if we have something new */
@@ -1601,6 +1602,8 @@ static void process_send_sockets(struct work_struct *work)
{
struct connection *con = container_of(work, struct connection, swork);
+ WARN_ON(test_bit(CF_IS_OTHERCON, &con->flags));
+
clear_bit(CF_WRITE_PENDING, &con->flags);
if (con->sock == NULL) /* not mutex protected so check it inside too */
con->connect_action(con);