summaryrefslogtreecommitdiffstats
path: root/net/9p/trans_fd.c
diff options
context:
space:
mode:
authorSimon Derr <simon.derr@bull.net>2014-03-10 16:38:52 +0100
committerEric Van Hensbergen <ericvh@gmail.com>2014-03-25 16:38:15 -0500
commit0bfd6845c0b5e3df3507d2b4d230478980e7f04a (patch)
treeabfd8e782c669baa4f16922ffc0e002eeb0af153 /net/9p/trans_fd.c
parent931700d26bf17c583805f52121a41231e64868f3 (diff)
downloadop-kernel-dev-0bfd6845c0b5e3df3507d2b4d230478980e7f04a.zip
op-kernel-dev-0bfd6845c0b5e3df3507d2b4d230478980e7f04a.tar.gz
9P: Get rid of REQ_STATUS_FLSH
This request state is mostly useless, and properly implementing it for RDMA would require an extra lock to be taken in handle_recv() and in rdma_cancel() to avoid this race: handle_recv() rdma_cancel() . . . if req->state == SENT req->state = RCVD . . req->state = FLSH So just get rid of it. Signed-off-by: Simon Derr <simon.derr@bull.net> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/trans_fd.c')
-rw-r--r--net/9p/trans_fd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index fda4951..9c80642 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -345,8 +345,7 @@ static void p9_read_work(struct work_struct *work)
"mux %p pkt: size: %d bytes tag: %d\n", m, n, tag);
m->req = p9_tag_lookup(m->client, tag);
- if (!m->req || (m->req->status != REQ_STATUS_SENT &&
- m->req->status != REQ_STATUS_FLSH)) {
+ if (!m->req || (m->req->status != REQ_STATUS_SENT)) {
p9_debug(P9_DEBUG_ERROR, "Unexpected packet tag %d\n",
tag);
err = -EIO;
@@ -701,9 +700,7 @@ static int p9_fd_cancel(struct p9_client *client, struct p9_req_t *req)
list_del(&req->req_list);
req->status = REQ_STATUS_FLSHD;
ret = 0;
- } else if (req->status == REQ_STATUS_SENT)
- req->status = REQ_STATUS_FLSH;
-
+ }
spin_unlock(&client->lock);
return ret;
OpenPOWER on IntegriCloud