From: Ilya Dryomov <idryomov@gmail.com>
Date: Wed, 25 Apr 2018 12:17:13 +0200
Subject: libceph: get rid of more_kvec in try_write()
Git-commit: d2935d6f758fa72290ed30bd7482675e04715b6f
Patch-mainline: v4.18-rc1
References: FATE#324714
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>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Acked-by: Luis Henriques <lhenriques@suse.com>
---
net/ceph/messenger.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -2534,9 +2534,6 @@ static int try_write(struct ceph_connect
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);
@@ -2557,7 +2554,8 @@ more:
}
}
-more_kvec:
+more:
+ dout("try_write out_kvec_bytes %d\n", con->out_kvec_bytes);
BUG_ON(!con->sock);
/* kvec data queued? */
@@ -2582,7 +2580,7 @@ more_kvec:
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) {
@@ -2618,8 +2616,6 @@ out:
return ret;
}
-
-
/*
* Read what we can from the socket.
*/