Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320292
b: refs/heads/master
c: 188048b
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed Jul 6, 2012
1 parent 184808f commit 9715e4f
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: a8d00e3cdef4c1c4f194414b72b24cd995439a05
refs/heads/master: 188048bce311ee41e5178bc3255415d0eae28423
18 changes: 9 additions & 9 deletions trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,8 @@ static void ceph_sock_state_change(struct sock *sk)
case TCP_CLOSE_WAIT:
dout("%s TCP_CLOSE_WAIT\n", __func__);
con_sock_state_closing(con);
if (test_and_set_bit(SOCK_CLOSED, &con->flags) == 0) {
if (test_bit(CONNECTING, &con->state))
con->error_msg = "connection failed";
else
con->error_msg = "socket closed";
if (!test_and_set_bit(SOCK_CLOSED, &con->flags))
queue_con(con);
}
break;
case TCP_ESTABLISHED:
dout("%s TCP_ESTABLISHED\n", __func__);
Expand Down Expand Up @@ -2187,6 +2182,14 @@ static void con_work(struct work_struct *work)

mutex_lock(&con->mutex);
restart:
if (test_and_clear_bit(SOCK_CLOSED, &con->flags)) {
if (test_bit(CONNECTING, &con->state))
con->error_msg = "connection failed";
else
con->error_msg = "socket closed";
goto fault;
}

if (test_and_clear_bit(BACKOFF, &con->flags)) {
dout("con_work %p backing off\n", con);
if (queue_delayed_work(ceph_msgr_wq, &con->work,
Expand Down Expand Up @@ -2216,9 +2219,6 @@ static void con_work(struct work_struct *work)
con_close_socket(con);
}

if (test_and_clear_bit(SOCK_CLOSED, &con->flags))
goto fault;

ret = try_read(con);
if (ret == -EAGAIN)
goto restart;
Expand Down

0 comments on commit 9715e4f

Please sign in to comment.