aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/9p/trans_rdma.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c
index f127ae504911..b374c578ddb8 100644
--- a/net/9p/trans_rdma.c
+++ b/net/9p/trans_rdma.c
@@ -510,6 +510,11 @@ dont_need_post_recv:
510 goto send_error; 510 goto send_error;
511 } 511 }
512 512
513 /* Mark request as `sent' *before* we actually send it,
514 * because doing if after could erase the REQ_STATUS_RCVD
515 * status in case of a very fast reply.
516 */
517 req->status = REQ_STATUS_SENT;
513 err = ib_post_send(rdma->qp, &wr, &bad_wr); 518 err = ib_post_send(rdma->qp, &wr, &bad_wr);
514 if (err) 519 if (err)
515 goto send_error; 520 goto send_error;
@@ -519,6 +524,7 @@ dont_need_post_recv:
519 524
520 /* Handle errors that happened during or while preparing the send: */ 525 /* Handle errors that happened during or while preparing the send: */
521 send_error: 526 send_error:
527 req->status = REQ_STATUS_ERROR;
522 kfree(c); 528 kfree(c);
523 p9_debug(P9_DEBUG_ERROR, "Error %d in rdma_request()\n", err); 529 p9_debug(P9_DEBUG_ERROR, "Error %d in rdma_request()\n", err);
524 530