summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSimon Derr <simon.derr@bull.net>2014-03-10 16:38:50 +0100
committerEric Van Hensbergen <ericvh@gmail.com>2014-03-25 16:38:12 -0500
commit3f9d5b8dfdc7b013287caaa847b378912b013f77 (patch)
treebd10ade4064b26ded527730fd6de195faedb2968 /net
parentafd8d65411551839b7ab14a539d00075b2793451 (diff)
downloadlinux-stable-3f9d5b8dfdc7b013287caaa847b378912b013f77.tar.gz
linux-stable-3f9d5b8dfdc7b013287caaa847b378912b013f77.tar.bz2
linux-stable-3f9d5b8dfdc7b013287caaa847b378912b013f77.zip
9pnet_rdma: update request status during send
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>
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:
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);