Skip to content

Commit

Permalink
RPC/RDMA: ensure connection attempt is complete before signalling.
Browse files Browse the repository at this point in the history
The RPC/RDMA connection logic could return early from reconnection
attempts, leading to additional spurious retries.

Signed-off-by: Tom Talpey <talpey@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Tom Talpey authored and Trond Myklebust committed Oct 10, 2008
1 parent 08ca0dc commit c055551
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions net/sunrpc/xprtrdma/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -804,9 +804,8 @@ rpcrdma_ep_connect(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia)
struct rdma_cm_id *id;
int rc = 0;
int retry_count = 0;
int reconnect = (ep->rep_connected != 0);

if (reconnect) {
if (ep->rep_connected != 0) {
struct rpcrdma_xprt *xprt;
retry:
rc = rpcrdma_ep_disconnect(ep, ia);
Expand Down Expand Up @@ -871,9 +870,6 @@ if (strnicmp(ia->ri_id->device->dma_device->bus->name, "pci", 3) == 0) {
goto out;
}

if (reconnect)
return 0;

wait_event_interruptible(ep->rep_connect_wait, ep->rep_connected != 0);

/*
Expand Down

0 comments on commit c055551

Please sign in to comment.