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>
This commit is contained in:
Alexander Aring 2021-06-02 09:45:18 -04:00 committed by David Teigland
parent 6c6a1cc666
commit 9a4139a794

View File

@ -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;