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>
This commit is contained in:
parent
42ce56e50d
commit
71ececdaca
1 changed files with 1 additions and 12 deletions
|
@ -339,17 +339,6 @@ void ceph_con_close(struct ceph_connection *con)
|
||||||
queue_con(con);
|
queue_con(con);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* clean up connection state
|
|
||||||
*/
|
|
||||||
void ceph_con_shutdown(struct ceph_connection *con)
|
|
||||||
{
|
|
||||||
dout("con_shutdown %p\n", con);
|
|
||||||
reset_connection(con);
|
|
||||||
set_bit(DEAD, &con->state);
|
|
||||||
con_close_socket(con); /* silently ignore errors */
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reopen a closed connection, with a new peer address.
|
* Reopen a closed connection, with a new peer address.
|
||||||
*/
|
*/
|
||||||
|
@ -380,7 +369,7 @@ void ceph_con_put(struct ceph_connection *con)
|
||||||
atomic_read(&con->nref), atomic_read(&con->nref) - 1);
|
atomic_read(&con->nref), atomic_read(&con->nref) - 1);
|
||||||
BUG_ON(atomic_read(&con->nref) == 0);
|
BUG_ON(atomic_read(&con->nref) == 0);
|
||||||
if (atomic_dec_and_test(&con->nref)) {
|
if (atomic_dec_and_test(&con->nref)) {
|
||||||
ceph_con_shutdown(con);
|
BUG_ON(con->sock);
|
||||||
kfree(con);
|
kfree(con);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue