diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2016-05-04 10:53:30 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2016-05-13 15:53:06 -0400 |
commit | 76ee8fd64ac9af36b03b68912c18b3d3cd5c99de (patch) | |
tree | 0e386437be480287bb80694350b596dbc7f8e317 /net/sunrpc/xprtrdma | |
parent | 0319aafc95eaae10fdb867c35ce9bacfca27eaa3 (diff) | |
download | talos-op-linux-76ee8fd64ac9af36b03b68912c18b3d3cd5c99de.tar.gz talos-op-linux-76ee8fd64ac9af36b03b68912c18b3d3cd5c99de.zip |
svcrdma: Drain QP before freeing svcrdma_xprt
If the server has forced a disconnect, the associated QP has not
been moved to the Error state, and thus Receives are still posted.
Ensure Receives (and any other outstanding WRs) are drained to
release resources that can be freed during teardown of the
svcrdma_xprt.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/xprtrdma')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 02a112c7cb6a..dd9440137834 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -1180,6 +1180,9 @@ static void __svc_rdma_free(struct work_struct *work) dprintk("svcrdma: %s(%p)\n", __func__, rdma); + if (rdma->sc_qp && !IS_ERR(rdma->sc_qp)) + ib_drain_qp(rdma->sc_qp); + /* We should only be called from kref_put */ if (atomic_read(&xprt->xpt_ref.refcount) != 0) pr_err("svcrdma: sc_xprt still in use? (%d)\n", |