Message ID | 1524652404-7690-1-git-send-email-idryomov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Apr 25, 2018 at 6:33 AM, Ilya Dryomov <idryomov@gmail.com> wrote: > 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: Ilya Dryomov <idryomov@gmail.com> > --- > net/ceph/messenger.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c > index a7bfc07d2876..809060786e75 100644 > --- a/net/ceph/messenger.c > +++ b/net/ceph/messenger.c > @@ -2574,9 +2574,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); > @@ -2597,7 +2594,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? */ > @@ -2622,7 +2620,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) { > @@ -2658,8 +2656,6 @@ static int try_write(struct ceph_connection *con) > return ret; > } > > - > - > /* > * Read what we can from the socket. > */ > -- > 2.4.3 > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Jason Dillaman <dillaman@redhat.com>
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index a7bfc07d2876..809060786e75 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2574,9 +2574,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); @@ -2597,7 +2594,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? */ @@ -2622,7 +2620,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) { @@ -2658,8 +2656,6 @@ static int try_write(struct ceph_connection *con) return ret; } - - /* * Read what we can from the socket. */
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: Ilya Dryomov <idryomov@gmail.com> --- net/ceph/messenger.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)