提交 2820fd39 编写于 作者: P Philipp Reisner

drbd: Move the call to listen() out of drbd_accept()

Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 c5b005ab
......@@ -468,11 +468,6 @@ static int drbd_accept(const char **what, struct socket *sock, struct socket **n
struct sock *sk = sock->sk;
int err = 0;
*what = "listen";
err = sock->ops->listen(sock, 5);
if (err < 0)
goto out;
*what = "sock_create_lite";
err = sock_create_lite(sk->sk_family, sk->sk_type, sk->sk_protocol,
newsock);
......@@ -742,6 +737,11 @@ static struct socket *drbd_wait_for_connect(struct drbd_tconn *tconn)
if (err < 0)
goto out;
what = "listen";
err = s_listen->ops->listen(s_listen, 5);
if (err < 0)
goto out;
err = drbd_accept(&what, s_listen, &s_estab);
out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册