From: Alexander Aring Date: Wed, 2 Jun 2021 13:45:18 +0000 (-0400) Subject: fs: dlm: move dlm allow conn X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9a4139a79403161f190cf30be7d89ac877ae3b12;p=linux.git 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 Signed-off-by: David Teigland --- diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 02b636d113fb7..6b150e3aa30c7 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;