Skip to content

Commit 71ececd

Browse files
committed
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>
1 parent 42ce56e commit 71ececd

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎fs/ceph/messenger.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -339,17 +339,6 @@ void ceph_con_close(struct ceph_connection *con)
339339
queue_con(con);
340340
}
341341

342-
/*
343-
* clean up connection state
344-
*/
345-
void 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-
353342
/*
354343
* Reopen a closed connection, with a new peer address.
355344
*/
@@ -380,7 +369,7 @@ void ceph_con_put(struct ceph_connection *con)
380369
atomic_read(&con->nref), atomic_read(&con->nref) - 1);
381370
BUG_ON(atomic_read(&con->nref) == 0);
382371
if (atomic_dec_and_test(&con->nref)) {
383-
ceph_con_shutdown(con);
372+
BUG_ON(con->sock);
384373
kfree(con);
385374
}
386375
}

0 commit comments

Comments
 (0)