Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23036
b: refs/heads/master
c: 4f7a07b
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Mar 23, 2006
1 parent ecbef91 commit f5ab23b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 9331b3157c835353dd28efcd80d23563ad226aee
refs/heads/master: 4f7a07b88726781e37c4c5f63db3a6ee3f8500d3
11 changes: 6 additions & 5 deletions trunk/fs/9p/mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/poll.h>
#include <linux/kthread.h>
#include <linux/idr.h>
#include <linux/mutex.h>

#include "debug.h"
#include "v9fs.h"
Expand Down Expand Up @@ -110,7 +111,7 @@ static void v9fs_pollwait(struct file *filp, wait_queue_head_t * wait_address,
static u16 v9fs_mux_get_tag(struct v9fs_mux_data *);
static void v9fs_mux_put_tag(struct v9fs_mux_data *, u16);

static DECLARE_MUTEX(v9fs_mux_task_lock);
static DEFINE_MUTEX(v9fs_mux_task_lock);
static struct workqueue_struct *v9fs_mux_wq;

static int v9fs_mux_num;
Expand Down Expand Up @@ -166,7 +167,7 @@ static int v9fs_mux_poll_start(struct v9fs_mux_data *m)

dprintk(DEBUG_MUX, "mux %p muxnum %d procnum %d\n", m, v9fs_mux_num,
v9fs_mux_poll_task_num);
up(&v9fs_mux_task_lock);
mutex_lock(&v9fs_mux_task_lock);

n = v9fs_mux_calc_poll_procs(v9fs_mux_num + 1);
if (n > v9fs_mux_poll_task_num) {
Expand Down Expand Up @@ -225,7 +226,7 @@ static int v9fs_mux_poll_start(struct v9fs_mux_data *m)
}

v9fs_mux_num++;
down(&v9fs_mux_task_lock);
mutex_unlock(&v9fs_mux_task_lock);

return 0;
}
Expand All @@ -235,7 +236,7 @@ static void v9fs_mux_poll_stop(struct v9fs_mux_data *m)
int i;
struct v9fs_mux_poll_task *vpt;

up(&v9fs_mux_task_lock);
mutex_lock(&v9fs_mux_task_lock);
vpt = m->poll_task;
list_del(&m->mux_list);
for(i = 0; i < ARRAY_SIZE(m->poll_waddr); i++) {
Expand All @@ -252,7 +253,7 @@ static void v9fs_mux_poll_stop(struct v9fs_mux_data *m)
v9fs_mux_poll_task_num--;
}
v9fs_mux_num--;
down(&v9fs_mux_task_lock);
mutex_unlock(&v9fs_mux_task_lock);
}

/**
Expand Down

0 comments on commit f5ab23b

Please sign in to comment.