aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/conv.c1
-rw-r--r--fs/9p/fcall.c1
-rw-r--r--fs/9p/fid.c1
-rw-r--r--fs/9p/mux.c16
-rw-r--r--fs/9p/v9fs.c1
-rw-r--r--fs/9p/vfs_addr.c2
-rw-r--r--fs/9p/vfs_dir.c5
-rw-r--r--fs/9p/vfs_file.c9
-rw-r--r--fs/9p/vfs_inode.c4
9 files changed, 23 insertions, 17 deletions
diff --git a/fs/9p/conv.c b/fs/9p/conv.c
index 56d88c1a09..a3ed571eee 100644
--- a/fs/9p/conv.c
+++ b/fs/9p/conv.c
@@ -27,6 +27,7 @@
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/errno.h> 28#include <linux/errno.h>
29#include <linux/fs.h> 29#include <linux/fs.h>
30#include <linux/sched.h>
30#include <linux/idr.h> 31#include <linux/idr.h>
31#include <asm/uaccess.h> 32#include <asm/uaccess.h>
32#include "debug.h" 33#include "debug.h"
diff --git a/fs/9p/fcall.c b/fs/9p/fcall.c
index 8556097fcd..dc336a6759 100644
--- a/fs/9p/fcall.c
+++ b/fs/9p/fcall.c
@@ -27,6 +27,7 @@
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/errno.h> 28#include <linux/errno.h>
29#include <linux/fs.h> 29#include <linux/fs.h>
30#include <linux/sched.h>
30#include <linux/idr.h> 31#include <linux/idr.h>
31 32
32#include "debug.h" 33#include "debug.h"
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index 70492ccb43..27507201f9 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -23,6 +23,7 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/errno.h> 24#include <linux/errno.h>
25#include <linux/fs.h> 25#include <linux/fs.h>
26#include <linux/sched.h>
26#include <linux/idr.h> 27#include <linux/idr.h>
27 28
28#include "debug.h" 29#include "debug.h"
diff --git a/fs/9p/mux.c b/fs/9p/mux.c
index 90a79c7845..944273c3db 100644
--- a/fs/9p/mux.c
+++ b/fs/9p/mux.c
@@ -110,8 +110,8 @@ struct v9fs_mux_rpc {
110}; 110};
111 111
112static int v9fs_poll_proc(void *); 112static int v9fs_poll_proc(void *);
113static void v9fs_read_work(void *); 113static void v9fs_read_work(struct work_struct *work);
114static void v9fs_write_work(void *); 114static void v9fs_write_work(struct work_struct *work);
115static void v9fs_pollwait(struct file *filp, wait_queue_head_t * wait_address, 115static void v9fs_pollwait(struct file *filp, wait_queue_head_t * wait_address,
116 poll_table * p); 116 poll_table * p);
117static u16 v9fs_mux_get_tag(struct v9fs_mux_data *); 117static u16 v9fs_mux_get_tag(struct v9fs_mux_data *);
@@ -297,8 +297,8 @@ struct v9fs_mux_data *v9fs_mux_init(struct v9fs_transport *trans, int msize,
297 m->rbuf = NULL; 297 m->rbuf = NULL;
298 m->wpos = m->wsize = 0; 298 m->wpos = m->wsize = 0;
299 m->wbuf = NULL; 299 m->wbuf = NULL;
300 INIT_WORK(&m->rq, v9fs_read_work, m); 300 INIT_WORK(&m->rq, v9fs_read_work);
301 INIT_WORK(&m->wq, v9fs_write_work, m); 301 INIT_WORK(&m->wq, v9fs_write_work);
302 m->wsched = 0; 302 m->wsched = 0;
303 memset(&m->poll_waddr, 0, sizeof(m->poll_waddr)); 303 memset(&m->poll_waddr, 0, sizeof(m->poll_waddr));
304 m->poll_task = NULL; 304 m->poll_task = NULL;
@@ -458,13 +458,13 @@ static int v9fs_poll_proc(void *a)
458/** 458/**
459 * v9fs_write_work - called when a transport can send some data 459 * v9fs_write_work - called when a transport can send some data
460 */ 460 */
461static void v9fs_write_work(void *a) 461static void v9fs_write_work(struct work_struct *work)
462{ 462{
463 int n, err; 463 int n, err;
464 struct v9fs_mux_data *m; 464 struct v9fs_mux_data *m;
465 struct v9fs_req *req; 465 struct v9fs_req *req;
466 466
467 m = a; 467 m = container_of(work, struct v9fs_mux_data, wq);
468 468
469 if (m->err < 0) { 469 if (m->err < 0) {
470 clear_bit(Wworksched, &m->wsched); 470 clear_bit(Wworksched, &m->wsched);
@@ -564,7 +564,7 @@ static void process_request(struct v9fs_mux_data *m, struct v9fs_req *req)
564/** 564/**
565 * v9fs_read_work - called when there is some data to be read from a transport 565 * v9fs_read_work - called when there is some data to be read from a transport
566 */ 566 */
567static void v9fs_read_work(void *a) 567static void v9fs_read_work(struct work_struct *work)
568{ 568{
569 int n, err; 569 int n, err;
570 struct v9fs_mux_data *m; 570 struct v9fs_mux_data *m;
@@ -572,7 +572,7 @@ static void v9fs_read_work(void *a)
572 struct v9fs_fcall *rcall; 572 struct v9fs_fcall *rcall;
573 char *rbuf; 573 char *rbuf;
574 574
575 m = a; 575 m = container_of(work, struct v9fs_mux_data, rq);
576 576
577 if (m->err < 0) 577 if (m->err < 0)
578 return; 578 return;
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 0f628041e3..0b96fae8b4 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -26,6 +26,7 @@
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/errno.h> 27#include <linux/errno.h>
28#include <linux/fs.h> 28#include <linux/fs.h>
29#include <linux/sched.h>
29#include <linux/parser.h> 30#include <linux/parser.h>
30#include <linux/idr.h> 31#include <linux/idr.h>
31 32
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index 9dfd259a70..cc24abf232 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -54,7 +54,7 @@ static int v9fs_vfs_readpage(struct file *filp, struct page *page)
54 int retval = -EIO; 54 int retval = -EIO;
55 loff_t offset = page_offset(page); 55 loff_t offset = page_offset(page);
56 int count = PAGE_CACHE_SIZE; 56 int count = PAGE_CACHE_SIZE;
57 struct inode *inode = filp->f_dentry->d_inode; 57 struct inode *inode = filp->f_path.dentry->d_inode;
58 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode); 58 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode);
59 int rsize = v9ses->maxdata - V9FS_IOHDRSZ; 59 int rsize = v9ses->maxdata - V9FS_IOHDRSZ;
60 struct v9fs_fid *v9f = filp->private_data; 60 struct v9fs_fid *v9f = filp->private_data;
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index e32d597103..3129688143 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -30,6 +30,7 @@
30#include <linux/stat.h> 30#include <linux/stat.h>
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/smp_lock.h> 32#include <linux/smp_lock.h>
33#include <linux/sched.h>
33#include <linux/inet.h> 34#include <linux/inet.h>
34#include <linux/idr.h> 35#include <linux/idr.h>
35 36
@@ -70,7 +71,7 @@ static inline int dt_type(struct v9fs_stat *mistat)
70static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) 71static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
71{ 72{
72 struct v9fs_fcall *fcall = NULL; 73 struct v9fs_fcall *fcall = NULL;
73 struct inode *inode = filp->f_dentry->d_inode; 74 struct inode *inode = filp->f_path.dentry->d_inode;
74 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode); 75 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode);
75 struct v9fs_fid *file = filp->private_data; 76 struct v9fs_fid *file = filp->private_data;
76 unsigned int i, n, s; 77 unsigned int i, n, s;
@@ -79,7 +80,7 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
79 struct v9fs_stat stat; 80 struct v9fs_stat stat;
80 int over = 0; 81 int over = 0;
81 82
82 dprintk(DEBUG_VFS, "name %s\n", filp->f_dentry->d_name.name); 83 dprintk(DEBUG_VFS, "name %s\n", filp->f_path.dentry->d_name.name);
83 84
84 fid = file->fid; 85 fid = file->fid;
85 86
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index c3c47eda75..e86a071512 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -26,6 +26,7 @@
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/errno.h> 27#include <linux/errno.h>
28#include <linux/fs.h> 28#include <linux/fs.h>
29#include <linux/sched.h>
29#include <linux/file.h> 30#include <linux/file.h>
30#include <linux/stat.h> 31#include <linux/stat.h>
31#include <linux/string.h> 32#include <linux/string.h>
@@ -59,7 +60,7 @@ int v9fs_file_open(struct inode *inode, struct file *file)
59 60
60 dprintk(DEBUG_VFS, "inode: %p file: %p \n", inode, file); 61 dprintk(DEBUG_VFS, "inode: %p file: %p \n", inode, file);
61 62
62 vfid = v9fs_fid_lookup(file->f_dentry); 63 vfid = v9fs_fid_lookup(file->f_path.dentry);
63 if (!vfid) { 64 if (!vfid) {
64 dprintk(DEBUG_ERROR, "Couldn't resolve fid from dentry\n"); 65 dprintk(DEBUG_ERROR, "Couldn't resolve fid from dentry\n");
65 return -EBADF; 66 return -EBADF;
@@ -132,7 +133,7 @@ free_fcall:
132static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) 133static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
133{ 134{
134 int res = 0; 135 int res = 0;
135 struct inode *inode = filp->f_dentry->d_inode; 136 struct inode *inode = filp->f_path.dentry->d_inode;
136 137
137 dprintk(DEBUG_VFS, "filp: %p lock: %p\n", filp, fl); 138 dprintk(DEBUG_VFS, "filp: %p lock: %p\n", filp, fl);
138 139
@@ -160,7 +161,7 @@ static ssize_t
160v9fs_file_read(struct file *filp, char __user * data, size_t count, 161v9fs_file_read(struct file *filp, char __user * data, size_t count,
161 loff_t * offset) 162 loff_t * offset)
162{ 163{
163 struct inode *inode = filp->f_dentry->d_inode; 164 struct inode *inode = filp->f_path.dentry->d_inode;
164 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode); 165 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode);
165 struct v9fs_fid *v9f = filp->private_data; 166 struct v9fs_fid *v9f = filp->private_data;
166 struct v9fs_fcall *fcall = NULL; 167 struct v9fs_fcall *fcall = NULL;
@@ -224,7 +225,7 @@ static ssize_t
224v9fs_file_write(struct file *filp, const char __user * data, 225v9fs_file_write(struct file *filp, const char __user * data,
225 size_t count, loff_t * offset) 226 size_t count, loff_t * offset)
226{ 227{
227 struct inode *inode = filp->f_dentry->d_inode; 228 struct inode *inode = filp->f_path.dentry->d_inode;
228 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode); 229 struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode);
229 struct v9fs_fid *v9fid = filp->private_data; 230 struct v9fs_fid *v9fid = filp->private_data;
230 struct v9fs_fcall *fcall; 231 struct v9fs_fcall *fcall;
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 5241c600ce..18f26cdfd8 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -256,7 +256,7 @@ static int
256v9fs_create(struct v9fs_session_info *v9ses, u32 pfid, char *name, u32 perm, 256v9fs_create(struct v9fs_session_info *v9ses, u32 pfid, char *name, u32 perm,
257 u8 mode, char *extension, u32 *fidp, struct v9fs_qid *qid, u32 *iounit) 257 u8 mode, char *extension, u32 *fidp, struct v9fs_qid *qid, u32 *iounit)
258{ 258{
259 u32 fid; 259 int fid;
260 int err; 260 int err;
261 struct v9fs_fcall *fcall; 261 struct v9fs_fcall *fcall;
262 262
@@ -310,7 +310,7 @@ static struct v9fs_fid*
310v9fs_clone_walk(struct v9fs_session_info *v9ses, u32 fid, struct dentry *dentry) 310v9fs_clone_walk(struct v9fs_session_info *v9ses, u32 fid, struct dentry *dentry)
311{ 311{
312 int err; 312 int err;
313 u32 nfid; 313 int nfid;
314 struct v9fs_fid *ret; 314 struct v9fs_fid *ret;
315 struct v9fs_fcall *fcall; 315 struct v9fs_fcall *fcall;
316 316