Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346197
b: refs/heads/master
c: 7e0f096
h: refs/heads/master
i:
  346195: 84d768c
v: v3
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent 3dc32a4 commit 68901d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2820fd396940756904bd7e4136115f493c63d369
refs/heads/master: 7e0f096b8d3ffcf04955c239e80993ec451c9a1a
30 changes: 2 additions & 28 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,33 +461,6 @@ static void drbd_wait_ee_list_empty(struct drbd_conf *mdev,
spin_unlock_irq(&mdev->tconn->req_lock);
}

/* see also kernel_accept; which is only present since 2.6.18.
* also we want to log which part of it failed, exactly */
static int drbd_accept(const char **what, struct socket *sock, struct socket **newsock)
{
struct sock *sk = sock->sk;
int err = 0;

*what = "sock_create_lite";
err = sock_create_lite(sk->sk_family, sk->sk_type, sk->sk_protocol,
newsock);
if (err < 0)
goto out;

*what = "accept";
err = sock->ops->accept(sock, *newsock, 0);
if (err < 0) {
sock_release(*newsock);
*newsock = NULL;
goto out;
}
(*newsock)->ops = sock->ops;
__module_get((*newsock)->ops->owner);

out:
return err;
}

static int drbd_recv_short(struct socket *sock, void *buf, size_t size, int flags)
{
mm_segment_t oldfs;
Expand Down Expand Up @@ -742,7 +715,8 @@ static struct socket *drbd_wait_for_connect(struct drbd_tconn *tconn)
if (err < 0)
goto out;

err = drbd_accept(&what, s_listen, &s_estab);
what = "accept";
err = kernel_accept(s_listen, &s_estab, 0);

out:
if (s_listen)
Expand Down

0 comments on commit 68901d2

Please sign in to comment.