|
@@ -668,7 +668,7 @@ static struct svcxprt_rdma *rdma_create_xprt(struct svc_serv *serv,
|
|
|
return cma_xprt;
|
|
|
}
|
|
|
|
|
|
-int svc_rdma_post_recv(struct svcxprt_rdma *xprt)
|
|
|
+int svc_rdma_post_recv(struct svcxprt_rdma *xprt, gfp_t flags)
|
|
|
{
|
|
|
struct ib_recv_wr recv_wr, *bad_recv_wr;
|
|
|
struct svc_rdma_op_ctxt *ctxt;
|
|
@@ -686,7 +686,9 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt)
|
|
|
pr_err("svcrdma: Too many sges (%d)\n", sge_no);
|
|
|
goto err_put_ctxt;
|
|
|
}
|
|
|
- page = alloc_page(GFP_KERNEL | __GFP_NOFAIL);
|
|
|
+ page = alloc_page(flags);
|
|
|
+ if (!page)
|
|
|
+ goto err_put_ctxt;
|
|
|
ctxt->pages[sge_no] = page;
|
|
|
pa = ib_dma_map_page(xprt->sc_cm_id->device,
|
|
|
page, 0, PAGE_SIZE,
|
|
@@ -1182,7 +1184,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
|
|
|
|
|
|
/* Post receive buffers */
|
|
|
for (i = 0; i < newxprt->sc_max_requests; i++) {
|
|
|
- ret = svc_rdma_post_recv(newxprt);
|
|
|
+ ret = svc_rdma_post_recv(newxprt, GFP_KERNEL);
|
|
|
if (ret) {
|
|
|
dprintk("svcrdma: failure posting receive buffers\n");
|
|
|
goto errout;
|