diff options
author | Alexander Aring <aahringo@redhat.com> | 2021-06-02 09:45:18 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2021-06-02 11:53:04 -0500 |
commit | 9a4139a79403161f190cf30be7d89ac877ae3b12 (patch) | |
tree | 6417ad0e51d170cb7f963c8cadfc184947f479a8 /fs/dlm | |
parent | 6c6a1cc666956cbb3ac6db79ed401ee027e6f950 (diff) |
fs: dlm: move dlm allow conn
This patch checks if possible allowing new connections is allowed before
queueing the listen socket to accept new connections.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/lowcomms.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 02b636d113fb..6b150e3aa30c 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -471,6 +471,9 @@ static void lowcomms_data_ready(struct sock *sk) static void lowcomms_listen_data_ready(struct sock *sk) { + if (!dlm_allow_conn) + return; + queue_work(recv_workqueue, &listen_con.rwork); } @@ -969,10 +972,6 @@ static int accept_from_sock(struct listen_connection *con) struct connection *addcon; unsigned int mark; - if (!dlm_allow_conn) { - return -1; - } - if (!con->sock) return -ENOTCONN; |