1 --- shfs-0.35.orig/shfs/Linux-2.6/inode.c
2 +++ shfs-0.35/shfs/Linux-2.6/inode.c
3 @@ -341,12 +341,21 @@ out:
7 +#ifdef NEW_VFS_DENTRY_API
9 +shfs_get_sb(struct file_system_type *fs_type,
10 + int flags, const char *dev_name, void *data, struct vfsmount *mnt)
12 + return get_sb_nodev(fs_type, flags, data, shfs_read_super, mnt);
15 static struct super_block *
16 shfs_get_sb(struct file_system_type *fs_type,
17 int flags, const char *dev_name, void *data)
19 return get_sb_nodev(fs_type, flags, data, shfs_read_super);
23 static struct file_system_type sh_fs_type = {
25 --- shfs-0.35.orig/shfs/Linux-2.6/file.c
26 +++ shfs-0.35/shfs/Linux-2.6/file.c
27 @@ -199,7 +199,7 @@ shfs_file_open(struct inode *inode, stru
31 -shfs_file_flush(struct file *f)
32 +do_file_flush(struct file *f)
34 struct dentry *dentry = f->f_dentry;
35 struct shfs_sb_info *info = info_from_dentry(dentry);
36 @@ -222,6 +222,16 @@ shfs_file_flush(struct file *f)
40 +#ifdef FLUSH_HAS_LOCK_OWNER
41 +shfs_file_flush(struct file *f, fl_owner_t id)
43 +shfs_file_flush(struct file *f)
46 + return do_file_flush(f);
50 shfs_file_release(struct inode *inode, struct file *f)
52 struct dentry *dentry = f->f_dentry;
53 @@ -311,7 +321,7 @@ shfs_slow_write(struct file *f, const ch
55 written = generic_file_write(f, buf, count, offset);
57 - result = shfs_file_flush(f);
58 + result = do_file_flush(f);
59 written = result < 0 ? result: written;
62 Index: shfs-0.35/shfs/Linux-2.6/proc.c
63 ===================================================================
64 --- shfs-0.35.orig/shfs/Linux-2.6/proc.c
65 +++ shfs-0.35/shfs/Linux-2.6/proc.c
66 @@ -570,6 +570,16 @@ error:
70 +#ifdef NEW_VFS_DENTRY_API
72 +shfs_statfs(struct dentry *dentry, struct kstatfs *attr)
74 + struct shfs_sb_info *info = info_from_sb(dentry->d_sb);
77 + return info->fops.statfs(info, attr);
81 shfs_statfs(struct super_block *sb, struct kstatfs *attr)
83 @@ -578,4 +588,5 @@ shfs_statfs(struct super_block *sb, stru
85 return info->fops.statfs(info, attr);
89 --- shfs-0.35.orig/shfs/Linux-2.6/shfs_fs.h
90 +++ shfs-0.35/shfs/Linux-2.6/shfs_fs.h
93 #include <linux/ioctl.h>
94 #include <linux/pagemap.h>
95 +#include <linux/version.h>
97 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)
98 +#define NEW_VFS_DENTRY_API
99 +#define FLUSH_HAS_LOCK_OWNER
102 #define SHFS_MAX_AGE(info) (((info)->ttl * HZ) / 1000)
103 #define SOCKBUF_SIZE (SHFS_PATH_MAX * 10)
104 @@ -100,7 +106,12 @@ int reply(char *s);
105 void set_garbage(struct shfs_sb_info *info, int write, int count);
106 int get_name(struct dentry *d, char *name);
107 int shfs_notify_change(struct dentry *dentry, struct iattr *attr);
109 +#ifdef NEW_VFS_DENTRY_API
110 +int shfs_statfs(struct dentry *dentry, struct kstatfs *attr);
112 int shfs_statfs(struct super_block *sb, struct kstatfs *attr);
116 void shfs_set_inode_attr(struct inode *inode, struct shfs_fattr *fattr);
117 --- shfs-0.35.orig/shfs/Linux-2.6/symlink.c
118 +++ shfs-0.35/shfs/Linux-2.6/symlink.c
119 @@ -41,7 +41,7 @@ error:
125 shfs_follow_link(struct dentry *dentry, struct nameidata *nd)
127 struct shfs_sb_info *info = info_from_dentry(dentry);
128 @@ -61,7 +61,7 @@ shfs_follow_link(struct dentry *dentry,
129 DEBUG("%s\n", real_name);
130 result = vfs_follow_link(nd, real_name);
136 struct inode_operations shfs_symlink_inode_operations = {
137 --- shfs-0.35.orig/shfs/Linux-2.6/dcache.c 2004-06-01 15:16:19.000000000 +0200
138 +++ shfs-0.35/shfs/Linux-2.6/dcache.c 2006-02-17 17:36:02.000000000 +0100
140 spin_lock(&dcache_lock);
141 next = parent->d_subdirs.next;
142 while (next != &parent->d_subdirs) {
143 - dentry = list_entry(next, struct dentry, d_child);
144 + dentry = list_entry(next, struct dentry, d_u.d_child);
145 dentry->d_fsdata = NULL;
146 shfs_age_dentry(info, dentry);
149 spin_lock(&dcache_lock);
150 next = parent->d_subdirs.next;
151 while (next != &parent->d_subdirs) {
152 - dent = list_entry(next, struct dentry, d_child);
153 + dent = list_entry(next, struct dentry, d_u.d_child);
154 if ((unsigned long)dent->d_fsdata == fpos) {