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

Commit 17b6fd9d authored by Simon Derr's avatar Simon Derr Committed by Eric Van Hensbergen
Browse files

9P/RDMA: rdma_request() needs not allocate req->rc



p9_tag_alloc() takes care of that.

Signed-off-by: default avatarSimon Derr <simon.derr@bull.net>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent ea071aa1
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -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