diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 9a1c27c61de8d63ea894628bffa4ed6744108824..a127d14421164830c15644fe5210977ba4baba13 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -3240,9 +3240,10 @@ void ceph_con_keepalive(struct ceph_connection *con) dout("con_keepalive %p\n", con); mutex_lock(&con->mutex); clear_standby(con); + con_flag_set(con, CON_FLAG_KEEPALIVE_PENDING); mutex_unlock(&con->mutex); - if (con_flag_test_and_set(con, CON_FLAG_KEEPALIVE_PENDING) == 0 && - con_flag_test_and_set(con, CON_FLAG_WRITE_PENDING) == 0) + + if (con_flag_test_and_set(con, CON_FLAG_WRITE_PENDING) == 0) queue_con(con); } EXPORT_SYMBOL(ceph_con_keepalive);