]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xprtrdma: Use ro_unmap_sync in xprt_rdma_send_request
authorChuck Lever <chuck.lever@oracle.com>
Mon, 9 Oct 2017 16:03:34 +0000 (12:03 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 16 Oct 2017 17:51:27 +0000 (13:51 -0400)
The "safe" version of ro_unmap is used here to avoid waiting
unnecessarily. However:

 - It is safe to wait. After all, we have to wait anyway when using
   FMR to register memory.

 - This case is rare: it occurs only after a reconnect.

By switching this call site to ro_unmap_sync, the final use of
ro_unmap_safe is removed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/transport.c

index 8cf5ccfe180d35a6809d121ff6d0cb7da71a3464..eb46d2479b09efdca7d0254172b45235e8a08604 100644 (file)
@@ -728,7 +728,8 @@ xprt_rdma_send_request(struct rpc_task *task)
 
        /* On retransmit, remove any previously registered chunks */
        if (unlikely(!list_empty(&req->rl_registered)))
-               r_xprt->rx_ia.ri_ops->ro_unmap_safe(r_xprt, req, false);
+               r_xprt->rx_ia.ri_ops->ro_unmap_sync(r_xprt,
+                                                   &req->rl_registered);
 
        rc = rpcrdma_marshal_req(r_xprt, rqst);
        if (rc < 0)