Commit 9a4139a7 authored by Alexander Aring's avatar Alexander Aring Committed by David Teigland
Browse files

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: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 6c6a1cc6
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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;