diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2012-07-12 10:22:48 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:58:29 +0100 |
commit | 2820fd396940756904bd7e4136115f493c63d369 (patch) | |
tree | 88eb8980212dd39620917a703126b73597567668 /drivers/block/drbd/drbd_receiver.c | |
parent | drbd: use bitmap_parse instead of __bitmap_parse (diff) | |
download | linux-2820fd396940756904bd7e4136115f493c63d369.tar.xz linux-2820fd396940756904bd7e4136115f493c63d369.zip |
drbd: Move the call to listen() out of drbd_accept()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 1e9e5145e3c3..8f25095f390c 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -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: |