]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xprtrdma: Eliminate unnecessary lock cycle in xprt_rdma_send_request
authorChuck Lever <chuck.lever@oracle.com>
Fri, 15 Dec 2017 01:56:18 +0000 (20:56 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 16 Jan 2018 16:19:42 +0000 (11:19 -0500)
The rpcrdma_req is not shared yet, and its associated Send hasn't
been posted, thus RMW should be safe. There's no need for the
expense of a lock cycle here.

Fixes: 0ba6f37012db ("xprtrdma: Refactor rpcrdma_deferred_completion")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/transport.c

index 7f9b628228071e735ce9fba03d3fe4ce59655578..7db063f8dd8a2664233f298ed72857275c6e7362 100644 (file)
@@ -735,7 +735,7 @@ xprt_rdma_send_request(struct rpc_task *task)
                goto drop_connection;
        req->rl_connect_cookie = xprt->connect_cookie;
 
-       set_bit(RPCRDMA_REQ_F_PENDING, &req->rl_flags);
+       __set_bit(RPCRDMA_REQ_F_PENDING, &req->rl_flags);
        if (rpcrdma_ep_post(&r_xprt->rx_ia, &r_xprt->rx_ep, req))
                goto drop_connection;