]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
9pnet_rdma: update request status during send
authorSimon Derr <simon.derr@bull.net>
Mon, 10 Mar 2014 15:38:50 +0000 (16:38 +0100)
committerEric Van Hensbergen <ericvh@gmail.com>
Tue, 25 Mar 2014 21:38:12 +0000 (16:38 -0500)
This will be needed by the flush logic.

Signed-off-by: Simon Derr <simon.derr@bull.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
net/9p/trans_rdma.c

index f127ae5049111b11ca8d28f22a75c26ed4718885..b374c578ddb8c1d59db3f341c3e23eba7b3908da 100644 (file)
@@ -510,6 +510,11 @@ dont_need_post_recv:
                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 @@ dont_need_post_recv:
 
  /* 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);