> On Mar 21, 2017, at 1:54 PM, Sagi Grimberg <sagi@xxxxxxxxxxx> wrote: > > >> svc_rdma_build_send_wr(ctxt, 1); >> ret = svc_rdma_send(rdma, &ctxt->send_wr); >> if (ret) { >> + svc_rdma_unmap_dma(ctxt); >> + svc_rdma_put_context(ctxt, 1); >> ret = -EIO; >> - goto out_unmap; >> } > > Any specific reason to not go with the goto scheme? Only one "goto out_unmap" call site is left, and this isn't a performance critical path. > Can't this function grow more error paths in the future? I can't think of any. The only time this code changes is when overhauls like this happens. I don't mind putting the out_unmap label back. > btw, I'm assuming svc_rdma_unmap_dma() is the opposite of > svc_rdma_map_reply_hdr() ? svc_rdma_map_reply_hdr() DMA-maps the transport header buffer. svc_rdma_unmap_dma() DMA-unmaps everything associated with the ctxt. -- Chuck Lever -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html