Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54475
b: refs/heads/master
c: 30d3a23
h: refs/heads/master
i:
  54473: c733c56
  54471: 5fde2a3
v: v3
  • Loading branch information
Patrick Caulfield authored and Steven Whitehouse committed May 1, 2007
1 parent 2a8354c commit 3440d03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: 2439fe50724e8693e8b933b3f8125d870bfbdb25
refs/heads/master: 30d3a2373f171e62e4032819f55fed2ec887d0b8
18 changes: 9 additions & 9 deletions trunk/fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static struct connection *assoc2con(int assoc_id)
struct connection *con;

down(&connections_lock);
for (i=0; i<max_nodeid; i++) {
for (i=0; i<=max_nodeid; i++) {
con = __nodeid2con(i, 0);
if (con && con->sctp_assoc == assoc_id) {
up(&connections_lock);
Expand Down Expand Up @@ -467,12 +467,10 @@ static void process_sctp_notification(struct connection *con, struct msghdr *msg
parg.associd = sn->sn_assoc_change.sac_assoc_id;
ret = kernel_getsockopt(con->sock, IPPROTO_SCTP, SCTP_SOCKOPT_PEELOFF,
(void *)&parg, &parglen);
if (ret < 0) {
if (ret) {
log_print("Can't peel off a socket for connection %d to node %d: err=%d\n",
parg.associd, nodeid, ret);
return;
}

file = fget(parg.sd);
new_con->sock = SOCKET_I(file->f_dentry->d_inode);
add_sock(new_con->sock, new_con);
Expand Down Expand Up @@ -585,7 +583,6 @@ static int receive_from_sock(struct connection *con)

/* Process SCTP notifications */
if (msg.msg_flags & MSG_NOTIFICATION) {
BUG_ON(con->nodeid != 0);
msg.msg_control = incmsg;
msg.msg_controllen = sizeof(incmsg);

Expand Down Expand Up @@ -984,6 +981,7 @@ static void init_local(void)
struct sockaddr_storage sas, *addr;
int i;

dlm_local_count = 0;
for (i = 0; i < DLM_MAX_ADDR_COUNT - 1; i++) {
if (dlm_our_addr(&sas, i))
break;
Expand Down Expand Up @@ -1350,8 +1348,8 @@ static void clean_writequeues(void)
{
int nodeid;

for (nodeid = 1; nodeid < max_nodeid; nodeid++) {
struct connection *con = nodeid2con(nodeid, 0);
for (nodeid = 1; nodeid <= max_nodeid; nodeid++) {
struct connection *con = __nodeid2con(nodeid, 0);

if (con)
clean_one_writequeue(con);
Expand Down Expand Up @@ -1394,7 +1392,7 @@ void dlm_lowcomms_stop(void)
socket activity.
*/
down(&connections_lock);
for (i = 0; i < max_nodeid; i++) {
for (i = 0; i <= max_nodeid; i++) {
con = __nodeid2con(i, 0);
if (con)
con->flags |= 0xFF;
Expand All @@ -1406,7 +1404,7 @@ void dlm_lowcomms_stop(void)
down(&connections_lock);
clean_writequeues();

for (i = 0; i < max_nodeid; i++) {
for (i = 0; i <= max_nodeid; i++) {
con = __nodeid2con(i, 0);
if (con) {
close_connection(con, true);
Expand All @@ -1415,8 +1413,10 @@ void dlm_lowcomms_stop(void)
kmem_cache_free(con_cache, con);
}
}
max_nodeid = 0;
up(&connections_lock);
kmem_cache_destroy(con_cache);
idr_init(&connections_idr);
}

int dlm_lowcomms_start(void)
Expand Down

0 comments on commit 3440d03

Please sign in to comment.