aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p/client.c
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2008-10-13 19:45:22 -0400
committerEric Van Hensbergen <ericvh@gmail.com>2008-10-17 12:04:42 -0400
commit673d62cdaac6ffbce980a349d3174b3929ceb9e5 (patch)
tree2917ded31ef9b3ab004c3a5575537643b34269e9 /net/9p/client.c
parentff683452f7bc52d7fd653cf5e67b1134555734c7 (diff)
9p: apply common request code to trans_fd
Apply the now common p9_req_t structure to the fd transport. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/client.c')
-rw-r--r--net/9p/client.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 867031934f75..f2d07ef9e6a4 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -268,6 +268,27 @@ static void p9_tag_cleanup(struct p9_client *c)
268 c->max_tag = 0; 268 c->max_tag = 0;
269} 269}
270 270
271/**
272 * p9_free_req - free a request and clean-up as necessary
273 * c: client state
274 * r: request to release
275 *
276 */
277
278void p9_free_req(struct p9_client *c, struct p9_req_t *r)
279{
280 r->flush_tag = P9_NOTAG;
281 r->status = REQ_STATUS_IDLE;
282 if (r->tc->tag != P9_NOTAG && p9_idpool_check(r->tc->tag, c->tagpool))
283 p9_idpool_put(r->tc->tag, c->tagpool);
284
285 /* if this was a flush request we have to free response fcall */
286 if (r->tc->id == P9_TFLUSH) {
287 kfree(r->tc);
288 kfree(r->rc);
289 }
290}
291
271static struct p9_fid *p9_fid_create(struct p9_client *clnt) 292static struct p9_fid *p9_fid_create(struct p9_client *clnt)
272{ 293{
273 int err; 294 int err;