Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234963
b: refs/heads/master
c: 61edeee
h: refs/heads/master
i:
  234961: 6db5f8b
  234959: 9536492
v: v3
  • Loading branch information
Tejun Heo committed Feb 1, 2011
1 parent 13c6cb5 commit e1bef8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 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: 83e759043abe9d0291f58f2427ba12bbb0a6e4f1
refs/heads/master: 61edeeed917958dce5b43134d6704451ddf421fa
20 changes: 5 additions & 15 deletions trunk/net/9p/trans_fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ struct p9_conn {

static DEFINE_SPINLOCK(p9_poll_lock);
static LIST_HEAD(p9_poll_pending_list);
static struct workqueue_struct *p9_mux_wq;
static struct task_struct *p9_poll_task;

static void p9_mux_poll_stop(struct p9_conn *m)
Expand Down Expand Up @@ -384,7 +383,7 @@ static void p9_read_work(struct work_struct *work)

if (n & POLLIN) {
P9_DPRINTK(P9_DEBUG_TRANS, "sched read work %p\n", m);
queue_work(p9_mux_wq, &m->rq);
schedule_work(&m->rq);
} else
clear_bit(Rworksched, &m->wsched);
} else
Expand Down Expand Up @@ -497,7 +496,7 @@ static void p9_write_work(struct work_struct *work)

if (n & POLLOUT) {
P9_DPRINTK(P9_DEBUG_TRANS, "sched write work %p\n", m);
queue_work(p9_mux_wq, &m->wq);
schedule_work(&m->wq);
} else
clear_bit(Wworksched, &m->wsched);
} else
Expand Down Expand Up @@ -629,7 +628,7 @@ static void p9_poll_mux(struct p9_conn *m)
P9_DPRINTK(P9_DEBUG_TRANS, "mux %p can read\n", m);
if (!test_and_set_bit(Rworksched, &m->wsched)) {
P9_DPRINTK(P9_DEBUG_TRANS, "sched read work %p\n", m);
queue_work(p9_mux_wq, &m->rq);
schedule_work(&m->rq);
}
}

Expand All @@ -639,7 +638,7 @@ static void p9_poll_mux(struct p9_conn *m)
if ((m->wsize || !list_empty(&m->unsent_req_list)) &&
!test_and_set_bit(Wworksched, &m->wsched)) {
P9_DPRINTK(P9_DEBUG_TRANS, "sched write work %p\n", m);
queue_work(p9_mux_wq, &m->wq);
schedule_work(&m->wq);
}
}
}
Expand Down Expand Up @@ -677,7 +676,7 @@ static int p9_fd_request(struct p9_client *client, struct p9_req_t *req)
n = p9_fd_poll(m->client, NULL);

if (n & POLLOUT && !test_and_set_bit(Wworksched, &m->wsched))
queue_work(p9_mux_wq, &m->wq);
schedule_work(&m->wq);

return 0;
}
Expand Down Expand Up @@ -1083,15 +1082,8 @@ static int p9_poll_proc(void *a)

int p9_trans_fd_init(void)
{
p9_mux_wq = create_workqueue("v9fs");
if (!p9_mux_wq) {
printk(KERN_WARNING "v9fs: mux: creating workqueue failed\n");
return -ENOMEM;
}

p9_poll_task = kthread_run(p9_poll_proc, NULL, "v9fs-poll");
if (IS_ERR(p9_poll_task)) {
destroy_workqueue(p9_mux_wq);
printk(KERN_WARNING "v9fs: mux: creating poll task failed\n");
return PTR_ERR(p9_poll_task);
}
Expand All @@ -1109,6 +1101,4 @@ void p9_trans_fd_exit(void)
v9fs_unregister_trans(&p9_tcp_trans);
v9fs_unregister_trans(&p9_unix_trans);
v9fs_unregister_trans(&p9_fd_trans);

destroy_workqueue(p9_mux_wq);
}

0 comments on commit e1bef8d

Please sign in to comment.