aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/messenger.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-18 14:27:06 -0500
committerSage Weil <sage@newdream.net>2009-11-18 14:29:45 -0500
commit71ececdacae24be333c534869cb1b06357f0e215 (patch)
treeb07d622fb4205ce980ec5b0b6e41455b08d78b42 /fs/ceph/messenger.c
parent42ce56e50d948fc7c1c8c3a749ee5a21a7e134f6 (diff)
ceph: remove unnecessary ceph_con_shutdown
We require that ceph_con_close be called before we drop the connection, so this is unneeded. Just BUG if con->sock != NULL. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/messenger.c')
-rw-r--r--fs/ceph/messenger.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c
index e389656b2a6b..d8a6a56a1571 100644
--- a/fs/ceph/messenger.c
+++ b/fs/ceph/messenger.c
@@ -340,17 +340,6 @@ void ceph_con_close(struct ceph_connection *con)
340} 340}
341 341
342/* 342/*
343 * clean up connection state
344 */
345void ceph_con_shutdown(struct ceph_connection *con)
346{
347 dout("con_shutdown %p\n", con);
348 reset_connection(con);
349 set_bit(DEAD, &con->state);
350 con_close_socket(con); /* silently ignore errors */
351}
352
353/*
354 * Reopen a closed connection, with a new peer address. 343 * Reopen a closed connection, with a new peer address.
355 */ 344 */
356void ceph_con_open(struct ceph_connection *con, struct ceph_entity_addr *addr) 345void ceph_con_open(struct ceph_connection *con, struct ceph_entity_addr *addr)
@@ -380,7 +369,7 @@ void ceph_con_put(struct ceph_connection *con)
380 atomic_read(&con->nref), atomic_read(&con->nref) - 1); 369 atomic_read(&con->nref), atomic_read(&con->nref) - 1);
381 BUG_ON(atomic_read(&con->nref) == 0); 370 BUG_ON(atomic_read(&con->nref) == 0);
382 if (atomic_dec_and_test(&con->nref)) { 371 if (atomic_dec_and_test(&con->nref)) {
383 ceph_con_shutdown(con); 372 BUG_ON(con->sock);
384 kfree(con); 373 kfree(con);
385 } 374 }
386} 375}