mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
ff683452f7
commit
673d62cdaa
4 changed files with 126 additions and 172 deletions
|
@ -268,6 +268,27 @@ static void p9_tag_cleanup(struct p9_client *c)
|
|||
c->max_tag = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* p9_free_req - free a request and clean-up as necessary
|
||||
* c: client state
|
||||
* r: request to release
|
||||
*
|
||||
*/
|
||||
|
||||
void p9_free_req(struct p9_client *c, struct p9_req_t *r)
|
||||
{
|
||||
r->flush_tag = P9_NOTAG;
|
||||
r->status = REQ_STATUS_IDLE;
|
||||
if (r->tc->tag != P9_NOTAG && p9_idpool_check(r->tc->tag, c->tagpool))
|
||||
p9_idpool_put(r->tc->tag, c->tagpool);
|
||||
|
||||
/* if this was a flush request we have to free response fcall */
|
||||
if (r->tc->id == P9_TFLUSH) {
|
||||
kfree(r->tc);
|
||||
kfree(r->rc);
|
||||
}
|
||||
}
|
||||
|
||||
static struct p9_fid *p9_fid_create(struct p9_client *clnt)
|
||||
{
|
||||
int err;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue