mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
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:
parent
6c6a1cc666
commit
9a4139a794
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user