Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167634
b: refs/heads/master
c: 6861f35
h: refs/heads/master
v: v3
  • Loading branch information
David Teigland committed Sep 30, 2009
1 parent 108a66c commit 6b82d83
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 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: 04bedd79a7037ee7af816b06c60c738144475c4a
refs/heads/master: 6861f350785bf476c2d4e3b9cb69ee36b78df2fc
23 changes: 12 additions & 11 deletions trunk/fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,9 @@ static void process_sctp_notification(struct connection *con,
int prim_len, ret;
int addr_len;
struct connection *new_con;
struct file *file;
sctp_peeloff_arg_t parg;
int parglen = sizeof(parg);
int err;

/*
* We get this before any data for an association.
Expand Down Expand Up @@ -516,19 +516,22 @@ static void process_sctp_notification(struct connection *con,
ret = kernel_getsockopt(con->sock, IPPROTO_SCTP,
SCTP_SOCKOPT_PEELOFF,
(void *)&parg, &parglen);
if (ret) {
if (ret < 0) {
log_print("Can't peel off a socket for "
"connection %d to node %d: err=%d\n",
"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);
return;
}
file = fget(parg.sd);
new_con->sock = SOCKET_I(file->f_dentry->d_inode);
add_sock(new_con->sock, new_con);
fput(file);
put_unused_fd(parg.sd);
sockfd_put(new_con->sock);

log_print("got new/restarted association %d nodeid %d",
(int)sn->sn_assoc_change.sac_assoc_id, nodeid);
log_print("connecting to %d sctp association %d",
nodeid, (int)sn->sn_assoc_change.sac_assoc_id);

/* Send any pending writes */
clear_bit(CF_CONNECT_PENDING, &new_con->flags);
Expand Down Expand Up @@ -841,8 +844,6 @@ static void sctp_init_assoc(struct connection *con)
if (con->retries++ > MAX_CONNECT_RETRIES)
return;

log_print("Initiating association with node %d", con->nodeid);

if (nodeid_to_addr(con->nodeid, (struct sockaddr *)&rem_addr)) {
log_print("no address for nodeid %d", con->nodeid);
return;
Expand Down

0 comments on commit 6b82d83

Please sign in to comment.