Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320296
b: refs/heads/master
c: 3ec50d1
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed Jul 6, 2012
1 parent a9d9564 commit 41c5e48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: bb9e6bba5d8b85b631390f8dbe8a24ae1ff5b48a
refs/heads/master: 3ec50d1868a9e0493046400bb1fdd054c7f64ebd
8 changes: 5 additions & 3 deletions trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,7 @@ static int process_connect(struct ceph_connection *con)
fail_protocol(con);
return -1;
}
clear_bit(NEGOTIATING, &con->state);
clear_bit(CONNECTING, &con->state);
con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq);
con->connect_seq++;
Expand Down Expand Up @@ -1951,7 +1952,6 @@ static int try_write(struct ceph_connection *con)

/* open the socket first? */
if (con->sock == NULL) {
clear_bit(NEGOTIATING, &con->state);
set_bit(CONNECTING, &con->state);

con_out_kvec_reset(con);
Expand Down Expand Up @@ -2190,10 +2190,12 @@ static void con_work(struct work_struct *work)
mutex_lock(&con->mutex);
restart:
if (test_and_clear_bit(SOCK_CLOSED, &con->flags)) {
if (test_and_clear_bit(CONNECTING, &con->state))
if (test_and_clear_bit(CONNECTING, &con->state)) {
clear_bit(NEGOTIATING, &con->state);
con->error_msg = "connection failed";
else
} else {
con->error_msg = "socket closed";
}
goto fault;
}

Expand Down

0 comments on commit 41c5e48

Please sign in to comment.