+16
−23
Loading
nvme_rdma_req_complete() and nvme_rdma_req_put() are called in a row except a single case. Move clearing completion_flags and req of rdma_req from nvme_rdma_req_put() to nvme_rdma_req_complete(), and then inline nvme_rdma_req_put() because nvme_rdma_req_put() does only insert now. To do this, change the type of the second parameter of nvme_rdma_req_complete() from struct nvme_request to struct spdk_nvme_rdma_req. For the exceptional case that only nvme_rdma_req_put() is called, change nvme_rdma_req_init() to clear rdma_req->req if returned with error. Signed-off-by:Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ibf7e6d245f3a48fb895cd9e6d92596ef833f26d1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2876 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by:
Michael Haeuptle <michaelhaeuptle@gmail.com>