Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110009
b: refs/heads/master
c: 7dc5d24
h: refs/heads/master
i:
  110007: 0d33948
v: v3
  • Loading branch information
Tejun Heo authored and Eric Van Hensbergen committed Sep 24, 2008
1 parent 39abffc commit 2e4d3da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72029fe85d8d060b3f966f2dbc36b3c75b5a6532
refs/heads/master: 7dc5d24be06a5ed874af035d52a083a7b61ef1bd
24 changes: 5 additions & 19 deletions trunk/net/9p/trans_fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ struct p9_mux_poll_task {
* @trans: reference to transport instance for this connection
* @tagpool: id accounting for transactions
* @err: error state
* @equeue: event wait_q (?)
* @req_list: accounting for requests which have been sent
* @unsent_req_list: accounting for requests that haven't been sent
* @rcall: current response &p9_fcall structure
Expand All @@ -178,7 +177,6 @@ struct p9_conn {
struct p9_trans *trans;
struct p9_idpool *tagpool;
int err;
wait_queue_head_t equeue;
struct list_head req_list;
struct list_head unsent_req_list;
struct p9_fcall *rcall;
Expand Down Expand Up @@ -430,7 +428,6 @@ static struct p9_conn *p9_conn_create(struct p9_trans *trans)
}

m->err = 0;
init_waitqueue_head(&m->equeue);
INIT_LIST_HEAD(&m->req_list);
INIT_LIST_HEAD(&m->unsent_req_list);
m->rcall = NULL;
Expand Down Expand Up @@ -483,18 +480,13 @@ static void p9_conn_destroy(struct p9_conn *m)
{
P9_DPRINTK(P9_DEBUG_MUX, "mux %p prev %p next %p\n", m,
m->mux_list.prev, m->mux_list.next);
p9_conn_cancel(m, -ECONNRESET);

if (!list_empty(&m->req_list)) {
/* wait until all processes waiting on this session exit */
P9_DPRINTK(P9_DEBUG_MUX,
"mux %p waiting for empty request queue\n", m);
wait_event_timeout(m->equeue, (list_empty(&m->req_list)), 5000);
P9_DPRINTK(P9_DEBUG_MUX, "mux %p request queue empty: %d\n", m,
list_empty(&m->req_list));
}

p9_mux_poll_stop(m);
cancel_work_sync(&m->rq);
cancel_work_sync(&m->wq);

p9_conn_cancel(m, -ECONNRESET);

m->trans = NULL;
p9_idpool_destroy(m->tagpool);
kfree(m);
Expand Down Expand Up @@ -840,8 +832,6 @@ static void p9_read_work(struct work_struct *work)
(*req->cb) (req, req->cba);
else
kfree(req->rcall);

wake_up(&m->equeue);
}
} else {
if (err >= 0 && rcall->id != P9_RFLUSH)
Expand Down Expand Up @@ -984,8 +974,6 @@ static void p9_mux_flush_cb(struct p9_req *freq, void *a)
(*req->cb) (req, req->cba);
else
kfree(req->rcall);

wake_up(&m->equeue);
}

kfree(freq->tcall);
Expand Down Expand Up @@ -1191,8 +1179,6 @@ void p9_conn_cancel(struct p9_conn *m, int err)
else
kfree(req->rcall);
}

wake_up(&m->equeue);
}

/**
Expand Down

0 comments on commit 2e4d3da

Please sign in to comment.