diff options
| author | Tom Talpey <talpey@netapp.com> | 2008-10-10 11:32:45 -0400 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-10-10 15:15:06 -0400 |
| commit | c055551e97e1ca00781bc41523f829e05a8afed7 (patch) | |
| tree | 6e4743b84b176788174b66c756b98562ce956a1b | |
| parent | 08ca0dce1eafa419059ac4cad9ed522af7052526 (diff) | |
RPC/RDMA: ensure connection attempt is complete before signalling.
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>
| -rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 170e69cba6c4..a5fef5e6c323 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
| @@ -804,9 +804,8 @@ rpcrdma_ep_connect(struct rpcrdma_ep *ep, struct rpcrdma_ia *ia) | |||
| 804 | struct rdma_cm_id *id; | 804 | struct rdma_cm_id *id; |
| 805 | int rc = 0; | 805 | int rc = 0; |
| 806 | int retry_count = 0; | 806 | int retry_count = 0; |
| 807 | int reconnect = (ep->rep_connected != 0); | ||
| 808 | 807 | ||
| 809 | if (reconnect) { | 808 | if (ep->rep_connected != 0) { |
| 810 | struct rpcrdma_xprt *xprt; | 809 | struct rpcrdma_xprt *xprt; |
| 811 | retry: | 810 | retry: |
| 812 | rc = rpcrdma_ep_disconnect(ep, ia); | 811 | rc = rpcrdma_ep_disconnect(ep, ia); |
| @@ -871,9 +870,6 @@ if (strnicmp(ia->ri_id->device->dma_device->bus->name, "pci", 3) == 0) { | |||
| 871 | goto out; | 870 | goto out; |
| 872 | } | 871 | } |
| 873 | 872 | ||
| 874 | if (reconnect) | ||
| 875 | return 0; | ||
| 876 | |||
| 877 | wait_event_interruptible(ep->rep_connect_wait, ep->rep_connected != 0); | 873 | wait_event_interruptible(ep->rep_connect_wait, ep->rep_connected != 0); |
| 878 | 874 | ||
| 879 | /* | 875 | /* |
