xprtrdma: Remove request_module from backchannel
[linux] / net / sunrpc / xprtrdma / backchannel.c
index e5b367a..e2704db 100644 (file)
@@ -5,7 +5,6 @@
  * Support for backward direction RPCs on RPC/RDMA.
  */
 
-#include <linux/module.h>
 #include <linux/sunrpc/xprt.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/svc_xprt.h>
@@ -101,7 +100,6 @@ int xprt_rdma_bc_setup(struct rpc_xprt *xprt, unsigned int reqs)
                goto out_free;
 
        r_xprt->rx_buf.rb_bc_srv_max_requests = reqs;
-       request_module("svcrdma");
        trace_xprtrdma_cb_setup(r_xprt, reqs);
        return 0;
 
@@ -193,21 +191,21 @@ static int rpcrdma_bc_marshal_reply(struct rpc_rqst *rqst)
  */
 int xprt_rdma_bc_send_reply(struct rpc_rqst *rqst)
 {
-       struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(rqst->rq_xprt);
+       struct rpc_xprt *xprt = rqst->rq_xprt;
+       struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt);
        struct rpcrdma_req *req = rpcr_to_rdmar(rqst);
        int rc;
 
-       if (!xprt_connected(rqst->rq_xprt))
-               goto drop_connection;
+       if (!xprt_connected(xprt))
+               return -ENOTCONN;
 
-       if (!xprt_request_get_cong(rqst->rq_xprt, rqst))
+       if (!xprt_request_get_cong(xprt, rqst))
                return -EBADSLT;
 
        rc = rpcrdma_bc_marshal_reply(rqst);
        if (rc < 0)
                goto failed_marshal;
 
-       rpcrdma_post_recvs(r_xprt, true);
        if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req))
                goto drop_connection;
        return 0;
@@ -216,7 +214,7 @@ failed_marshal:
        if (rc != -ENOTCONN)
                return rc;
 drop_connection:
-       xprt_disconnect_done(rqst->rq_xprt);
+       xprt_rdma_close(xprt);
        return -ENOTCONN;
 }
 
@@ -339,7 +337,7 @@ void rpcrdma_bc_receive_call(struct rpcrdma_xprt *r_xprt,
 
 out_overflow:
        pr_warn("RPC/RDMA backchannel overflow\n");
-       xprt_disconnect_done(xprt);
+       xprt_force_disconnect(xprt);
        /* This receive buffer gets reposted automatically
         * when the connection is re-established.
         */