]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/sunrpc/xprtrdma/transport.c
xprtrdma: Wake RPCs directly in rpcrdma_wc_send path
[linux.git] / net / sunrpc / xprtrdma / transport.c
index f84375ddbb4d85195108e6923e00ceb7a1a4cb66..9575f1d8db0739808a7a5bbd7733f5112ecc4ed0 100644 (file)
@@ -618,8 +618,16 @@ xprt_rdma_free(struct rpc_task *task)
        struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(rqst->rq_xprt);
        struct rpcrdma_req *req = rpcr_to_rdmar(rqst);
 
-       rpcrdma_release_rqst(r_xprt, req);
        trace_xprtrdma_op_free(task, req);
+
+       if (!list_empty(&req->rl_registered))
+               frwr_unmap_sync(r_xprt, req);
+
+       /* XXX: If the RPC is completing because of a signal and
+        * not because a reply was received, we ought to ensure
+        * that the Send completion has fired, so that memory
+        * involved with the Send is not still visible to the NIC.
+        */
 }
 
 /**