nvmf: fix the error path for shared data buffer free.
Since we use aligned buffer, I think that the error handling path here is not correct, the address is wrong. Change-Id: I5bcb7f050199496423f861fd6aea65e0fe48c804 Signed-off-by: Ziye Yang <ziye.yang@intel.com> Reviewed-on: https://review.gerrithub.io/435992 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
This commit is contained in:
parent
d5256e152d
commit
d40f805d54
@ -1177,7 +1177,7 @@ spdk_nvmf_rdma_request_fill_iovs(struct spdk_nvmf_rdma_transport *rtransport,
|
||||
nomem:
|
||||
while (i) {
|
||||
i--;
|
||||
spdk_mempool_put(rtransport->data_buf_pool, rdma_req->req.iov[i].iov_base);
|
||||
spdk_mempool_put(rtransport->data_buf_pool, rdma_req->data.buffers[i]);
|
||||
rdma_req->req.iov[i].iov_base = NULL;
|
||||
rdma_req->req.iov[i].iov_len = 0;
|
||||
|
||||
|
@ -2128,7 +2128,7 @@ spdk_nvmf_tcp_req_fill_iovs(struct spdk_nvmf_tcp_transport *ttransport,
|
||||
nomem:
|
||||
while (i) {
|
||||
i--;
|
||||
spdk_mempool_put(ttransport->data_buf_pool, tcp_req->req.iov[i].iov_base);
|
||||
spdk_mempool_put(ttransport->data_buf_pool, tcp_req->buffers[i]);
|
||||
tcp_req->req.iov[i].iov_base = NULL;
|
||||
tcp_req->req.iov[i].iov_len = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user