Commit d2935d6f authored by Ilya Dryomov's avatar Ilya Dryomov

libceph: get rid of more_kvec in try_write()

All gotos to "more" are conditioned on con->state == OPEN, but the only
thing "more" does is opening the socket if con->state == PREOPEN.  Kill
that label and rename "more_kvec" to "more".
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
Reviewed-by: default avatarJason Dillaman <dillaman@redhat.com>
parent fe943d50
......@@ -2575,9 +2575,6 @@ static int try_write(struct ceph_connection *con)
con->state != CON_STATE_OPEN)
return 0;
more:
dout("try_write out_kvec_bytes %d\n", con->out_kvec_bytes);
/* open the socket first? */
if (con->state == CON_STATE_PREOPEN) {
BUG_ON(con->sock);
......@@ -2598,7 +2595,8 @@ static int try_write(struct ceph_connection *con)
}
}
more_kvec:
more:
dout("try_write out_kvec_bytes %d\n", con->out_kvec_bytes);
BUG_ON(!con->sock);
/* kvec data queued? */
......@@ -2623,7 +2621,7 @@ static int try_write(struct ceph_connection *con)
ret = write_partial_message_data(con);
if (ret == 1)
goto more_kvec; /* we need to send the footer, too! */
goto more; /* we need to send the footer, too! */
if (ret == 0)
goto out;
if (ret < 0) {
......@@ -2659,8 +2657,6 @@ static int try_write(struct ceph_connection *con)
return ret;
}
/*
* Read what we can from the socket.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment