1 diff -urN shfs-0.35/shfs/Linux-2.6/dir.c shfs-0.35.new/shfs/Linux-2.6/dir.c
2 --- shfs-0.35/shfs/Linux-2.6/dir.c 2007-01-11 14:59:49.000000000 +0100
3 +++ shfs-0.35.new/shfs/Linux-2.6/dir.c 2007-01-11 14:55:21.000000000 +0100
6 shfs_invalid_dir_cache(dir);
7 result = shfs_instantiate(dentry);
8 - if (forced_write && dentry->d_inode && dentry->d_inode->u.generic_ip)
9 - ((struct shfs_inode_info *)dentry->d_inode->u.generic_ip)->unset_write_on_close = 1;
10 + if (forced_write && dentry->d_inode && dentry->d_inode->i_private)
11 + ((struct shfs_inode_info *)dentry->d_inode->i_private)->unset_write_on_close = 1;
15 diff -urN shfs-0.35/shfs/Linux-2.6/fcache.c shfs-0.35.new/shfs/Linux-2.6/fcache.c
16 --- shfs-0.35/shfs/Linux-2.6/fcache.c 2004-06-01 15:16:19.000000000 +0200
17 +++ shfs-0.35.new/shfs/Linux-2.6/fcache.c 2007-01-11 14:55:21.000000000 +0100
19 VERBOSE("dir in file cache?\n");
22 - p = (struct shfs_inode_info *)inode->u.generic_ip;
23 + p = (struct shfs_inode_info *)inode->i_private;
25 VERBOSE("inode without info\n");
28 VERBOSE("dir in file cache?\n");
31 - p = (struct shfs_inode_info *)inode->u.generic_ip;
32 + p = (struct shfs_inode_info *)inode->i_private;
34 VERBOSE("inode without info\n");
38 struct shfs_inode_info *p;
40 - p = (struct shfs_inode_info *)f->f_dentry->d_inode->u.generic_ip;
41 + p = (struct shfs_inode_info *)f->f_dentry->d_inode->i_private;
43 VERBOSE("inode without info\n");
48 DEBUG("ino: %lu\n", inode->i_ino);
49 - p = (struct shfs_inode_info *)inode->u.generic_ip;
50 + p = (struct shfs_inode_info *)inode->i_private;
52 VERBOSE("inode without info\n");
55 VERBOSE("dir in file cache?\n");
58 - p = (struct shfs_inode_info *)inode->u.generic_ip;
59 + p = (struct shfs_inode_info *)inode->i_private;
61 VERBOSE("inode without info\n");
64 VERBOSE("dir in file cache?\n");
67 - p = (struct shfs_inode_info *)inode->u.generic_ip;
68 + p = (struct shfs_inode_info *)inode->i_private;
70 VERBOSE("inode without info\n");
72 diff -urN shfs-0.35/shfs/Linux-2.6/file.c shfs-0.35.new/shfs/Linux-2.6/file.c
73 --- shfs-0.35/shfs/Linux-2.6/file.c 2004-06-01 15:16:19.000000000 +0200
74 +++ shfs-0.35.new/shfs/Linux-2.6/file.c 2007-01-11 14:55:21.000000000 +0100
76 #include <asm/fcntl.h>
77 #include <linux/smp_lock.h>
78 #include <linux/stat.h>
79 +#include <linux/fs.h>
82 #include "shfs_fs_sb.h"
84 struct dentry *dentry = f->f_dentry;
85 struct shfs_sb_info *info = info_from_dentry(dentry);
86 struct inode *inode = p->mapping->host;
87 - struct shfs_inode_info *i = (struct shfs_inode_info *)inode->u.generic_ip;
88 + struct shfs_inode_info *i = (struct shfs_inode_info *)inode->i_private;
89 char *buffer = kmap(p) + offset;
90 int written = 0, result;
91 unsigned count = to - offset;
95 /* if file was forced to be writeable, change attrs back on close */
96 - if (dentry->d_inode && dentry->d_inode->u.generic_ip) {
97 - if (((struct shfs_inode_info *)dentry->d_inode->u.generic_ip)->unset_write_on_close) {
98 + if (dentry->d_inode && dentry->d_inode->i_private) {
99 + if (((struct shfs_inode_info *)dentry->d_inode->i_private)->unset_write_on_close) {
100 char name[SHFS_PATH_MAX];
102 if (get_name(dentry, name) < 0)
105 struct file_operations shfs_file_operations = {
106 .llseek = generic_file_llseek,
107 - .read = generic_file_read,
108 - .write = generic_file_write,
109 + .read = generic_file_aio_read,
110 + .write = generic_file_aio_write,
112 .mmap = generic_file_mmap,
113 .open = shfs_file_open,
114 diff -urN shfs-0.35/shfs/Linux-2.6/inode.c shfs-0.35.new/shfs/Linux-2.6/inode.c
115 --- shfs-0.35/shfs/Linux-2.6/inode.c 2004-06-01 15:16:19.000000000 +0200
116 +++ shfs-0.35.new/shfs/Linux-2.6/inode.c 2007-01-11 14:55:21.000000000 +0100
118 shfs_set_inode_attr(struct inode *inode, struct shfs_fattr *fattr)
120 struct shfs_sb_info *info = info_from_inode(inode);
121 - struct shfs_inode_info *i = inode->u.generic_ip;
122 + struct shfs_inode_info *i = inode->i_private;
123 struct timespec last_time = inode->i_mtime;
124 loff_t last_size = inode->i_size;
127 inode->i_ctime = fattr->f_ctime;
128 inode->i_atime = fattr->f_atime;
129 inode->i_mtime = fattr->f_mtime;
130 - inode->i_blksize= fattr->f_blksize;
131 inode->i_blocks = fattr->f_blocks;
132 inode->i_size = fattr->f_size;
137 inode->i_ino = fattr->f_ino;
138 - i = inode->u.generic_ip = (struct shfs_inode_info *)KMEM_ALLOC("inode", inode_cache, GFP_KERNEL);
139 + i = inode->i_private = (struct shfs_inode_info *)KMEM_ALLOC("inode", inode_cache, GFP_KERNEL);
144 struct shfs_inode_info *i;
146 DEBUG("ino: %lu\n", inode->i_ino);
147 - i = (struct shfs_inode_info *)inode->u.generic_ip;
148 + i = (struct shfs_inode_info *)inode->i_private;
150 VERBOSE("invalid inode\n");
154 struct shfs_sb_info *info = info_from_dentry(dentry);
155 struct inode *inode = dentry->d_inode;
156 - struct shfs_inode_info *i = (struct shfs_inode_info *)inode->u.generic_ip;
157 + struct shfs_inode_info *i = (struct shfs_inode_info *)inode->i_private;
160 DEBUG("%s\n", dentry->d_name.name);
163 static struct super_block *
164 shfs_get_sb(struct file_system_type *fs_type,
165 - int flags, const char *dev_name, void *data)
166 + int flags, const char *dev_name, void *data, struct vfsmount *mnt)
168 - return get_sb_nodev(fs_type, flags, data, shfs_read_super);
169 + return get_sb_nodev(fs_type, flags, data, shfs_read_super, mnt);
172 static struct file_system_type sh_fs_type = {
173 diff -urN shfs-0.35/shfs/Linux-2.6/proc.c shfs-0.35.new/shfs/Linux-2.6/proc.c
174 --- shfs-0.35/shfs/Linux-2.6/proc.c 2004-06-01 15:16:19.000000000 +0200
175 +++ shfs-0.35.new/shfs/Linux-2.6/proc.c 2007-01-11 14:55:21.000000000 +0100
178 vec[0].iov_base = (void *)buffer;
180 - result = f->f_op->writev(f, (const struct iovec *) &vec, 1, &f->f_pos);
181 + result = f->f_op->aio_write(f, (const struct iovec *) &vec, 1, &f->f_pos);
183 DEBUG("error: %d\n", result);
184 if (result == -EAGAIN)
187 vec[0].iov_base = buffer;
189 - result = f->f_op->readv(f, (const struct iovec *)&vec, 1, &f->f_pos);
190 + result = f->f_op->aio_read(f, (const struct iovec *)&vec, 1, &f->f_pos);
192 /* peer has closed socket */
196 vec[0].iov_base = BUFFER+LEN;
198 - result = f->f_op->readv(f, (const struct iovec *)&vec, 1, &f->f_pos);
199 + result = f->f_op->aio_read(f, (const struct iovec *)&vec, 1, &f->f_pos);
201 if (result == -EPIPE && !sigpipe) {
202 sigdelset(¤t->pending.signal, SIGPIPE);