In preparation for connect timeout abstract ceph_connection fault-initiating logic into a separate function and start using it. Signed-off-by: Ilya Dryomov <ilya.dryomov@xxxxxxxxxxx> --- net/ceph/messenger.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 2ed1304d22a7..8ed76faf7032 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -378,6 +378,15 @@ static void con_sock_state_closed(struct ceph_connection *con) CON_SOCK_STATE_CLOSED); } + +static void con_fault_raise(struct ceph_connection *con) +{ + con_sock_state_closing(con); + con_flag_set(con, CON_FLAG_SOCK_CLOSED); + queue_con(con); +} + + /* * socket callback functions */ @@ -433,9 +442,7 @@ static void ceph_sock_state_change(struct sock *sk) dout("%s TCP_CLOSE\n", __func__); case TCP_CLOSE_WAIT: dout("%s TCP_CLOSE_WAIT\n", __func__); - con_sock_state_closing(con); - con_flag_set(con, CON_FLAG_SOCK_CLOSED); - queue_con(con); + con_fault_raise(con); break; case TCP_ESTABLISHED: dout("%s TCP_ESTABLISHED\n", __func__); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html