]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
9P/RDMA: rdma_request() needs not allocate req->rc
authorSimon Derr <simon.derr@bull.net>
Fri, 21 Jun 2013 13:32:35 +0000 (15:32 +0200)
committerEric Van Hensbergen <ericvh@gmail.com>
Mon, 8 Jul 2013 03:02:27 +0000 (22:02 -0500)
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>
net/9p/trans_rdma.c

index 2c69ddd691a16a0056ed071695fb3ebc6293a917..b1dfdf2078ff291c31ea42686ae2afd949151de2 100644 (file)
@@ -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