diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2018-10-01 20:25:57 +0200 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2018-10-02 22:16:54 +0200 |
commit | aadc5a94483b138c8d9ade6e8416b089733a34dd (patch) | |
tree | 9e5ce948124df9b8e7a7782c8c1ac2c07877bf65 /net | |
parent | xprtrdma: Conventional variable names in rpcrdma_conn_upcall (diff) | |
download | linux-aadc5a94483b138c8d9ade6e8416b089733a34dd.tar.xz linux-aadc5a94483b138c8d9ade6e8416b089733a34dd.zip |
xprtrdma: Eliminate "connstate" variable from rpcrdma_conn_upcall()
Clean up.
Since commit 173b8f49b3af ("xprtrdma: Demote "connect" log messages")
there has been no need to initialize connstat to zero. In fact, in
this code path there's now no reason not to set rep_connected
directly.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index f2c8c3c71d57..422d3db7b9a2 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -234,7 +234,6 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) struct rpcrdma_ia *ia = &r_xprt->rx_ia; struct rpcrdma_ep *ep = &r_xprt->rx_ep; struct rpc_xprt *xprt = &r_xprt->rx_xprt; - int connstate = 0; might_sleep(); @@ -270,28 +269,27 @@ rpcrdma_cm_event_handler(struct rdma_cm_id *id, struct rdma_cm_event *event) return 1; case RDMA_CM_EVENT_ESTABLISHED: ++xprt->connect_cookie; - connstate = 1; + ep->rep_connected = 1; rpcrdma_update_connect_private(r_xprt, &event->param.conn); goto connected; case RDMA_CM_EVENT_CONNECT_ERROR: - connstate = -ENOTCONN; + ep->rep_connected = -ENOTCONN; goto connected; case RDMA_CM_EVENT_UNREACHABLE: - connstate = -ENETUNREACH; + ep->rep_connected = -ENETUNREACH; goto connected; case RDMA_CM_EVENT_REJECTED: dprintk("rpcrdma: connection to %s:%s rejected: %s\n", rpcrdma_addrstr(r_xprt), rpcrdma_portstr(r_xprt), rdma_reject_msg(id, event->status)); - connstate = -ECONNREFUSED; + ep->rep_connected = -ECONNREFUSED; if (event->status == IB_CM_REJ_STALE_CONN) - connstate = -EAGAIN; + ep->rep_connected = -EAGAIN; goto connected; case RDMA_CM_EVENT_DISCONNECTED: ++xprt->connect_cookie; - connstate = -ECONNABORTED; + ep->rep_connected = -ECONNABORTED; connected: - ep->rep_connected = connstate; rpcrdma_conn_func(ep); wake_up_all(&ep->rep_connect_wait); /*FALLTHROUGH*/ |