Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320330
b: refs/heads/master
c: 8c50c81
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Jul 31, 2012
1 parent 6090f7e commit 2d9180e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 3a140a0d5c4b9e35373b016e41dfc85f1e526bdb
refs/heads/master: 8c50c817566dfa4581f82373aac39f3e608a7dc8
8 changes: 7 additions & 1 deletion trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ static void reset_connection(struct ceph_connection *con)
*/
void ceph_con_close(struct ceph_connection *con)
{
mutex_lock(&con->mutex);
dout("con_close %p peer %s\n", con,
ceph_pr_addr(&con->peer_addr.in_addr));
clear_bit(NEGOTIATING, &con->state);
Expand All @@ -515,11 +516,16 @@ void ceph_con_close(struct ceph_connection *con)
clear_bit(KEEPALIVE_PENDING, &con->flags);
clear_bit(WRITE_PENDING, &con->flags);

mutex_lock(&con->mutex);
reset_connection(con);
con->peer_global_seq = 0;
cancel_delayed_work(&con->work);
mutex_unlock(&con->mutex);

/*
* We cannot close the socket directly from here because the
* work threads use it without holding the mutex. Instead, let
* con_work() do it.
*/
queue_con(con);
}
EXPORT_SYMBOL(ceph_con_close);
Expand Down

0 comments on commit 2d9180e

Please sign in to comment.