Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291108
b: refs/heads/master
c: 2f2d76c
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Poirier authored and David S. Miller committed Mar 8, 2012
1 parent f907be4 commit 0da42f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 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: 0343c5543b1d3ffa08e6716d82afb62648b80eba
refs/heads/master: 2f2d76cc3e938389feee671b46252dde6880b3b7
22 changes: 8 additions & 14 deletions trunk/fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <linux/mutex.h>
#include <linux/sctp.h>
#include <linux/slab.h>
#include <net/sctp/sctp.h>
#include <net/sctp/user.h>
#include <net/ipv6.h>

Expand Down Expand Up @@ -474,9 +475,6 @@ static void process_sctp_notification(struct connection *con,
int prim_len, ret;
int addr_len;
struct connection *new_con;
sctp_peeloff_arg_t parg;
int parglen = sizeof(parg);
int err;

/*
* We get this before any data for an association.
Expand Down Expand Up @@ -525,23 +523,19 @@ static void process_sctp_notification(struct connection *con,
return;

/* Peel off a new sock */
parg.associd = sn->sn_assoc_change.sac_assoc_id;
ret = kernel_getsockopt(con->sock, IPPROTO_SCTP,
SCTP_SOCKOPT_PEELOFF,
(void *)&parg, &parglen);
sctp_lock_sock(con->sock->sk);
ret = sctp_do_peeloff(con->sock->sk,
sn->sn_assoc_change.sac_assoc_id,
&new_con->sock);
sctp_release_sock(con->sock->sk);
if (ret < 0) {
log_print("Can't peel off a socket for "
"connection %d to node %d: err=%d",
parg.associd, nodeid, ret);
return;
}
new_con->sock = sockfd_lookup(parg.sd, &err);
if (!new_con->sock) {
log_print("sockfd_lookup error %d", err);
(int)sn->sn_assoc_change.sac_assoc_id,
nodeid, ret);
return;
}
add_sock(new_con->sock, new_con);
sockfd_put(new_con->sock);

log_print("connecting to %d sctp association %d",
nodeid, (int)sn->sn_assoc_change.sac_assoc_id);
Expand Down

0 comments on commit 0da42f5

Please sign in to comment.