diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-03-02 21:00:14 +0100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2020-03-16 17:04:31 +0100 |
commit | 758a3bf9459d9daa19eac604f3dece77e0bf2441 (patch) | |
tree | ad087eb371340edce3a9fbf55059adb7b8d41966 /net/sunrpc | |
parent | NFSD: Clean up nfsd4_encode_readv (diff) | |
download | linux-758a3bf9459d9daa19eac604f3dece77e0bf2441.tar.xz linux-758a3bf9459d9daa19eac604f3dece77e0bf2441.zip |
svcrdma: Fix double svc_rdma_send_ctxt_put() in an error path
This error path is almost never executed. Found by code inspection.
Fixes: 99722fe4d5a6 ("svcrdma: Persistently allocate and DMA-map Send buffers")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_sendto.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index a11983c2056f..354c5619176a 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c @@ -786,7 +786,6 @@ static int svc_rdma_send_error_msg(struct svcxprt_rdma *rdma, struct svc_rqst *rqstp) { __be32 *p; - int ret; p = ctxt->sc_xprt_buf; trace_svcrdma_err_chunk(*p); @@ -798,13 +797,7 @@ static int svc_rdma_send_error_msg(struct svcxprt_rdma *rdma, svc_rdma_save_io_pages(rqstp, ctxt); ctxt->sc_send_wr.opcode = IB_WR_SEND; - ret = svc_rdma_send(rdma, &ctxt->sc_send_wr); - if (ret) { - svc_rdma_send_ctxt_put(rdma, ctxt); - return ret; - } - - return 0; + return svc_rdma_send(rdma, &ctxt->sc_send_wr); } /** |