|
@@ -285,23 +285,14 @@ xprt_setup_rdma(struct xprt_create *args)
|
|
|
return ERR_PTR(-EBADF);
|
|
|
}
|
|
|
|
|
|
- xprt = kzalloc(sizeof(struct rpcrdma_xprt), GFP_KERNEL);
|
|
|
+ xprt = xprt_alloc(sizeof(struct rpcrdma_xprt),
|
|
|
+ xprt_rdma_slot_table_entries);
|
|
|
if (xprt == NULL) {
|
|
|
dprintk("RPC: %s: couldn't allocate rpcrdma_xprt\n",
|
|
|
__func__);
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
}
|
|
|
|
|
|
- xprt->max_reqs = xprt_rdma_slot_table_entries;
|
|
|
- xprt->slot = kcalloc(xprt->max_reqs,
|
|
|
- sizeof(struct rpc_rqst), GFP_KERNEL);
|
|
|
- if (xprt->slot == NULL) {
|
|
|
- dprintk("RPC: %s: couldn't allocate %d slots\n",
|
|
|
- __func__, xprt->max_reqs);
|
|
|
- kfree(xprt);
|
|
|
- return ERR_PTR(-ENOMEM);
|
|
|
- }
|
|
|
-
|
|
|
/* 60 second timeout, no retries */
|
|
|
xprt->timeout = &xprt_rdma_default_timeout;
|
|
|
xprt->bind_timeout = (60U * HZ);
|