aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_recvfrom.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index 971271602dd0..c22d6b6f2db4 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -322,15 +322,6 @@ next_sge:
322 ctxt->direction = DMA_FROM_DEVICE; 322 ctxt->direction = DMA_FROM_DEVICE;
323 clear_bit(RDMACTXT_F_READ_DONE, &ctxt->flags); 323 clear_bit(RDMACTXT_F_READ_DONE, &ctxt->flags);
324 clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); 324 clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags);
325 if ((ch+1)->rc_discrim == 0) {
326 /*
327 * Checked in sq_cq_reap to see if we need to
328 * be enqueued
329 */
330 set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags);
331 ctxt->next = hdr_ctxt;
332 hdr_ctxt->next = head;
333 }
334 325
335 /* Prepare READ WR */ 326 /* Prepare READ WR */
336 memset(&read_wr, 0, sizeof read_wr); 327 memset(&read_wr, 0, sizeof read_wr);
@@ -348,7 +339,17 @@ next_sge:
348 rdma_set_ctxt_sge(ctxt, &sge[ch_sge_ary[ch_no].start], 339 rdma_set_ctxt_sge(ctxt, &sge[ch_sge_ary[ch_no].start],
349 &sgl_offset, 340 &sgl_offset,
350 read_wr.num_sge); 341 read_wr.num_sge);
351 342 if (((ch+1)->rc_discrim == 0) &&
343 (read_wr.num_sge == ch_sge_ary[ch_no].count)) {
344 /*
345 * Mark the last RDMA_READ with a bit to
346 * indicate all RPC data has been fetched from
347 * the client and the RPC needs to be enqueued.
348 */
349 set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags);
350 ctxt->next = hdr_ctxt;
351 hdr_ctxt->next = head;
352 }
352 /* Post the read */ 353 /* Post the read */
353 err = svc_rdma_send(xprt, &read_wr); 354 err = svc_rdma_send(xprt, &read_wr);
354 if (err) { 355 if (err) {