Skip to content

Commit

Permalink
9P/RDMA: rdma_request() needs not allocate req->rc
Browse files Browse the repository at this point in the history
p9_tag_alloc() takes care of that.

Signed-off-by: Simon Derr <simon.derr@bull.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
sderr authored and ericvh committed Jul 8, 2013
1 parent ea071aa commit 17b6fd9
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions net/9p/trans_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,26 +427,7 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req)
err = -ENOMEM;
goto err_close;
}

/*
* If the request has a buffer, steal it, otherwise
* allocate a new one. Typically, requests should already
* have receive buffers allocated and just swap them around
*/
if (!req->rc) {
req->rc = kmalloc(sizeof(struct p9_fcall)+client->msize,
GFP_NOFS);
if (req->rc) {
req->rc->sdata = (char *) req->rc +
sizeof(struct p9_fcall);
req->rc->capacity = client->msize;
}
}
rpl_context->rc = req->rc;
if (!rpl_context->rc) {
err = -ENOMEM;
goto err_free2;
}

/*
* Post a receive buffer for this request. We need to ensure
Expand Down

0 comments on commit 17b6fd9

Please sign in to comment.