Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f9d5b8d authored by Simon Derr's avatar Simon Derr Committed by Eric Van Hensbergen
Browse files

9pnet_rdma: update request status during send



This will be needed by the flush logic.

Signed-off-by: default avatarSimon Derr <simon.derr@bull.net>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent afd8d654
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -510,6 +510,11 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req)
		goto send_error;
	}

	/* Mark request as `sent' *before* we actually send it,
	 * because doing if after could erase the REQ_STATUS_RCVD
	 * status in case of a very fast reply.
	 */
	req->status = REQ_STATUS_SENT;
	err = ib_post_send(rdma->qp, &wr, &bad_wr);
	if (err)
		goto send_error;
@@ -519,6 +524,7 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req)

 /* Handle errors that happened during or while preparing the send: */
 send_error:
	req->status = REQ_STATUS_ERROR;
	kfree(c);
	p9_debug(P9_DEBUG_ERROR, "Error %d in rdma_request()\n", err);