diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /fs/9p | |
parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) |
Merge branch 'linus'
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/mux.c | 11 | ||||
-rw-r--r-- | fs/9p/vfs_inode.c | 3 |
2 files changed, 7 insertions, 7 deletions
diff --git a/fs/9p/mux.c b/fs/9p/mux.c index ea1134eb47..8e8356c1c2 100644 --- a/fs/9p/mux.c +++ b/fs/9p/mux.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/poll.h> | 31 | #include <linux/poll.h> |
32 | #include <linux/kthread.h> | 32 | #include <linux/kthread.h> |
33 | #include <linux/idr.h> | 33 | #include <linux/idr.h> |
34 | #include <linux/mutex.h> | ||
34 | 35 | ||
35 | #include "debug.h" | 36 | #include "debug.h" |
36 | #include "v9fs.h" | 37 | #include "v9fs.h" |
@@ -110,7 +111,7 @@ static void v9fs_pollwait(struct file *filp, wait_queue_head_t * wait_address, | |||
110 | static u16 v9fs_mux_get_tag(struct v9fs_mux_data *); | 111 | static u16 v9fs_mux_get_tag(struct v9fs_mux_data *); |
111 | static void v9fs_mux_put_tag(struct v9fs_mux_data *, u16); | 112 | static void v9fs_mux_put_tag(struct v9fs_mux_data *, u16); |
112 | 113 | ||
113 | static DECLARE_MUTEX(v9fs_mux_task_lock); | 114 | static DEFINE_MUTEX(v9fs_mux_task_lock); |
114 | static struct workqueue_struct *v9fs_mux_wq; | 115 | static struct workqueue_struct *v9fs_mux_wq; |
115 | 116 | ||
116 | static int v9fs_mux_num; | 117 | static int v9fs_mux_num; |
@@ -166,7 +167,7 @@ static int v9fs_mux_poll_start(struct v9fs_mux_data *m) | |||
166 | 167 | ||
167 | dprintk(DEBUG_MUX, "mux %p muxnum %d procnum %d\n", m, v9fs_mux_num, | 168 | dprintk(DEBUG_MUX, "mux %p muxnum %d procnum %d\n", m, v9fs_mux_num, |
168 | v9fs_mux_poll_task_num); | 169 | v9fs_mux_poll_task_num); |
169 | up(&v9fs_mux_task_lock); | 170 | mutex_lock(&v9fs_mux_task_lock); |
170 | 171 | ||
171 | n = v9fs_mux_calc_poll_procs(v9fs_mux_num + 1); | 172 | n = v9fs_mux_calc_poll_procs(v9fs_mux_num + 1); |
172 | if (n > v9fs_mux_poll_task_num) { | 173 | if (n > v9fs_mux_poll_task_num) { |
@@ -225,7 +226,7 @@ static int v9fs_mux_poll_start(struct v9fs_mux_data *m) | |||
225 | } | 226 | } |
226 | 227 | ||
227 | v9fs_mux_num++; | 228 | v9fs_mux_num++; |
228 | down(&v9fs_mux_task_lock); | 229 | mutex_unlock(&v9fs_mux_task_lock); |
229 | 230 | ||
230 | return 0; | 231 | return 0; |
231 | } | 232 | } |
@@ -235,7 +236,7 @@ static void v9fs_mux_poll_stop(struct v9fs_mux_data *m) | |||
235 | int i; | 236 | int i; |
236 | struct v9fs_mux_poll_task *vpt; | 237 | struct v9fs_mux_poll_task *vpt; |
237 | 238 | ||
238 | up(&v9fs_mux_task_lock); | 239 | mutex_lock(&v9fs_mux_task_lock); |
239 | vpt = m->poll_task; | 240 | vpt = m->poll_task; |
240 | list_del(&m->mux_list); | 241 | list_del(&m->mux_list); |
241 | for(i = 0; i < ARRAY_SIZE(m->poll_waddr); i++) { | 242 | for(i = 0; i < ARRAY_SIZE(m->poll_waddr); i++) { |
@@ -252,7 +253,7 @@ static void v9fs_mux_poll_stop(struct v9fs_mux_data *m) | |||
252 | v9fs_mux_poll_task_num--; | 253 | v9fs_mux_poll_task_num--; |
253 | } | 254 | } |
254 | v9fs_mux_num--; | 255 | v9fs_mux_num--; |
255 | down(&v9fs_mux_task_lock); | 256 | mutex_unlock(&v9fs_mux_task_lock); |
256 | } | 257 | } |
257 | 258 | ||
258 | /** | 259 | /** |
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 3ad8455f85..651a9e14d9 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -614,6 +614,7 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, | |||
614 | 614 | ||
615 | sb = dir->i_sb; | 615 | sb = dir->i_sb; |
616 | v9ses = v9fs_inode2v9ses(dir); | 616 | v9ses = v9fs_inode2v9ses(dir); |
617 | dentry->d_op = &v9fs_dentry_operations; | ||
617 | dirfid = v9fs_fid_lookup(dentry->d_parent); | 618 | dirfid = v9fs_fid_lookup(dentry->d_parent); |
618 | 619 | ||
619 | if (!dirfid) { | 620 | if (!dirfid) { |
@@ -681,8 +682,6 @@ static struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, | |||
681 | goto FreeFcall; | 682 | goto FreeFcall; |
682 | 683 | ||
683 | fid->qid = fcall->params.rstat.stat.qid; | 684 | fid->qid = fcall->params.rstat.stat.qid; |
684 | |||
685 | dentry->d_op = &v9fs_dentry_operations; | ||
686 | v9fs_stat2inode(&fcall->params.rstat.stat, inode, inode->i_sb); | 685 | v9fs_stat2inode(&fcall->params.rstat.stat, inode, inode->i_sb); |
687 | 686 | ||
688 | d_add(dentry, inode); | 687 | d_add(dentry, inode); |