diff options
author | Alex Elder <elder@inktank.com> | 2012-05-16 15:16:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-26 11:38:04 -0800 |
commit | 6b7cc02849d47abf3077e27aec841dbd140b8b35 (patch) | |
tree | 7f988f419f8fe3316883492fdf66cd5664f1ac55 | |
parent | 1f7631fba2a763f45bfec34bdf731e2089ca3d87 (diff) |
libceph: don't reset kvec in prepare_write_banner()
(cherry picked from commit d329156f16306449c273002486c28de3ddddfd89)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/ceph/messenger.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index a659b4de64a..bcbd409b5ca 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -686,7 +686,6 @@ static int prepare_connect_authorizer(struct ceph_connection *con) static void prepare_write_banner(struct ceph_messenger *msgr, struct ceph_connection *con) { - ceph_con_out_kvec_reset(con); ceph_con_out_kvec_add(con, strlen(CEPH_BANNER), CEPH_BANNER); ceph_con_out_kvec_add(con, sizeof (msgr->my_enc_addr), &msgr->my_enc_addr); @@ -726,10 +725,9 @@ static int prepare_write_connect(struct ceph_messenger *msgr, con->out_connect.protocol_version = cpu_to_le32(proto); con->out_connect.flags = 0; + ceph_con_out_kvec_reset(con); if (include_banner) prepare_write_banner(msgr, con); - else - ceph_con_out_kvec_reset(con); ceph_con_out_kvec_add(con, sizeof (con->out_connect), &con->out_connect); con->out_more = 0; |