diff options
Diffstat (limited to 'net/sunrpc/xprtrdma/svc_rdma_sendto.c')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_sendto.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index a3334e3b73cc..6c26a675435a 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c | |||
@@ -191,7 +191,6 @@ static int map_xdr(struct svcxprt_rdma *xprt, | |||
191 | struct xdr_buf *xdr, | 191 | struct xdr_buf *xdr, |
192 | struct svc_rdma_req_map *vec) | 192 | struct svc_rdma_req_map *vec) |
193 | { | 193 | { |
194 | int sge_max = (xdr->len+PAGE_SIZE-1) / PAGE_SIZE + 3; | ||
195 | int sge_no; | 194 | int sge_no; |
196 | u32 sge_bytes; | 195 | u32 sge_bytes; |
197 | u32 page_bytes; | 196 | u32 page_bytes; |
@@ -235,7 +234,11 @@ static int map_xdr(struct svcxprt_rdma *xprt, | |||
235 | sge_no++; | 234 | sge_no++; |
236 | } | 235 | } |
237 | 236 | ||
238 | BUG_ON(sge_no > sge_max); | 237 | dprintk("svcrdma: map_xdr: sge_no %d page_no %d " |
238 | "page_base %u page_len %u head_len %zu tail_len %zu\n", | ||
239 | sge_no, page_no, xdr->page_base, xdr->page_len, | ||
240 | xdr->head[0].iov_len, xdr->tail[0].iov_len); | ||
241 | |||
239 | vec->count = sge_no; | 242 | vec->count = sge_no; |
240 | return 0; | 243 | return 0; |
241 | } | 244 | } |
@@ -579,7 +582,6 @@ static int send_reply(struct svcxprt_rdma *rdma, | |||
579 | ctxt->sge[page_no+1].length = 0; | 582 | ctxt->sge[page_no+1].length = 0; |
580 | } | 583 | } |
581 | BUG_ON(sge_no > rdma->sc_max_sge); | 584 | BUG_ON(sge_no > rdma->sc_max_sge); |
582 | BUG_ON(sge_no > ctxt->count); | ||
583 | memset(&send_wr, 0, sizeof send_wr); | 585 | memset(&send_wr, 0, sizeof send_wr); |
584 | ctxt->wr_op = IB_WR_SEND; | 586 | ctxt->wr_op = IB_WR_SEND; |
585 | send_wr.wr_id = (unsigned long)ctxt; | 587 | send_wr.wr_id = (unsigned long)ctxt; |