aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-05-16 16:16:38 -0400
committerAlex Elder <elder@dreamhost.com>2012-05-17 09:18:12 -0400
commitd329156f16306449c273002486c28de3ddddfd89 (patch)
treeceba5b2bb6d7ba09194f519628cd0031bdad9e63 /net/ceph
parentc047be09349752b8a4dac27bc9f130bf4d592f11 (diff)
libceph: don't reset kvec in prepare_write_banner()
Move the kvec reset for a connection out of prepare_write_banner and into its only caller. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/messenger.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index a659b4de64aa..bcbd409b5ca7 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -686,7 +686,6 @@ static int prepare_connect_authorizer(struct ceph_connection *con)
686static void prepare_write_banner(struct ceph_messenger *msgr, 686static void prepare_write_banner(struct ceph_messenger *msgr,
687 struct ceph_connection *con) 687 struct ceph_connection *con)
688{ 688{
689 ceph_con_out_kvec_reset(con);
690 ceph_con_out_kvec_add(con, strlen(CEPH_BANNER), CEPH_BANNER); 689 ceph_con_out_kvec_add(con, strlen(CEPH_BANNER), CEPH_BANNER);
691 ceph_con_out_kvec_add(con, sizeof (msgr->my_enc_addr), 690 ceph_con_out_kvec_add(con, sizeof (msgr->my_enc_addr),
692 &msgr->my_enc_addr); 691 &msgr->my_enc_addr);
@@ -726,10 +725,9 @@ static int prepare_write_connect(struct ceph_messenger *msgr,
726 con->out_connect.protocol_version = cpu_to_le32(proto); 725 con->out_connect.protocol_version = cpu_to_le32(proto);
727 con->out_connect.flags = 0; 726 con->out_connect.flags = 0;
728 727
728 ceph_con_out_kvec_reset(con);
729 if (include_banner) 729 if (include_banner)
730 prepare_write_banner(msgr, con); 730 prepare_write_banner(msgr, con);
731 else
732 ceph_con_out_kvec_reset(con);
733 ceph_con_out_kvec_add(con, sizeof (con->out_connect), &con->out_connect); 731 ceph_con_out_kvec_add(con, sizeof (con->out_connect), &con->out_connect);
734 732
735 con->out_more = 0; 733 con->out_more = 0;