|
@@ -331,6 +331,7 @@ static struct rdma_cm_id *
|
|
rpcrdma_create_id(struct rpcrdma_xprt *xprt,
|
|
rpcrdma_create_id(struct rpcrdma_xprt *xprt,
|
|
struct rpcrdma_ia *ia, struct sockaddr *addr)
|
|
struct rpcrdma_ia *ia, struct sockaddr *addr)
|
|
{
|
|
{
|
|
|
|
+ unsigned long wtimeout = msecs_to_jiffies(RDMA_RESOLVE_TIMEOUT) + 1;
|
|
struct rdma_cm_id *id;
|
|
struct rdma_cm_id *id;
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
@@ -352,8 +353,12 @@ rpcrdma_create_id(struct rpcrdma_xprt *xprt,
|
|
__func__, rc);
|
|
__func__, rc);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
- wait_for_completion_interruptible_timeout(&ia->ri_done,
|
|
|
|
- msecs_to_jiffies(RDMA_RESOLVE_TIMEOUT) + 1);
|
|
|
|
|
|
+ rc = wait_for_completion_interruptible_timeout(&ia->ri_done, wtimeout);
|
|
|
|
+ if (rc < 0) {
|
|
|
|
+ dprintk("RPC: %s: wait() exited: %i\n",
|
|
|
|
+ __func__, rc);
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
|
|
/* FIXME:
|
|
/* FIXME:
|
|
* Until xprtrdma supports DEVICE_REMOVAL, the provider must
|
|
* Until xprtrdma supports DEVICE_REMOVAL, the provider must
|
|
@@ -376,8 +381,12 @@ rpcrdma_create_id(struct rpcrdma_xprt *xprt,
|
|
__func__, rc);
|
|
__func__, rc);
|
|
goto put;
|
|
goto put;
|
|
}
|
|
}
|
|
- wait_for_completion_interruptible_timeout(&ia->ri_done,
|
|
|
|
- msecs_to_jiffies(RDMA_RESOLVE_TIMEOUT) + 1);
|
|
|
|
|
|
+ rc = wait_for_completion_interruptible_timeout(&ia->ri_done, wtimeout);
|
|
|
|
+ if (rc < 0) {
|
|
|
|
+ dprintk("RPC: %s: wait() exited: %i\n",
|
|
|
|
+ __func__, rc);
|
|
|
|
+ goto put;
|
|
|
|
+ }
|
|
rc = ia->ri_async_rc;
|
|
rc = ia->ri_async_rc;
|
|
if (rc)
|
|
if (rc)
|
|
goto put;
|
|
goto put;
|