]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/rdma: unnecessary reinitiliazation of an iterator 18190/head
authorJustL <jlingys@connect.ust.hk>
Mon, 9 Oct 2017 12:37:43 +0000 (20:37 +0800)
committerJustL <jlingys@connect.ust.hk>
Mon, 9 Oct 2017 12:37:43 +0000 (20:37 +0800)
current_buffer iterator does not need to be reinitalized as no changes
occur between the initialization and iteration steps.

Signed-off-by: Justinas Lingys jlingys@connect.ust.hk
src/msg/async/rdma/RDMAConnectedSocketImpl.cc

index c0c26459d6c021e0dd12137219f88bc7f9054fbf..2bb7a2cf3ff3b1b0d6cd520338d977408e38a6d3 100644 (file)
@@ -541,7 +541,7 @@ int RDMAConnectedSocketImpl::post_work_request(std::vector<Chunk*> &tx_buffers)
 
   memset(iswr, 0, sizeof(iswr));
   memset(isge, 0, sizeof(isge));
-  current_buffer = tx_buffers.begin();
   while (current_buffer != tx_buffers.end()) {
     isge[current_sge].addr = reinterpret_cast<uint64_t>((*current_buffer)->buffer);
     isge[current_sge].length = (*current_buffer)->get_offset();