Skip to content

Commit

Permalink
drbd: Move the call to listen() out of drbd_accept()
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent c5b005a commit 2820fd3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 2820fd3

Please sign in to comment.