1 Index: shfs-0.35/shfs/Linux-2.6/inode.c
2 ===================================================================
3 --- shfs-0.35.orig/shfs/Linux-2.6/inode.c
4 +++ shfs-0.35/shfs/Linux-2.6/inode.c
5 @@ -341,12 +341,21 @@ out:
9 +#ifdef NEW_VFS_DENTRY_API
11 +shfs_get_sb(struct file_system_type *fs_type,
12 + int flags, const char *dev_name, void *data, struct vfsmount *mnt)
14 + return get_sb_nodev(fs_type, flags, data, shfs_read_super, mnt);
17 static struct super_block *
18 shfs_get_sb(struct file_system_type *fs_type,
19 int flags, const char *dev_name, void *data)
21 return get_sb_nodev(fs_type, flags, data, shfs_read_super);
25 static struct file_system_type sh_fs_type = {
27 Index: shfs-0.35/shfs/Linux-2.6/file.c
28 ===================================================================
29 --- shfs-0.35.orig/shfs/Linux-2.6/file.c
30 +++ shfs-0.35/shfs/Linux-2.6/file.c
31 @@ -199,7 +199,7 @@ shfs_file_open(struct inode *inode, stru
35 -shfs_file_flush(struct file *f)
36 +do_file_flush(struct file *f)
38 struct dentry *dentry = f->f_dentry;
39 struct shfs_sb_info *info = info_from_dentry(dentry);
40 @@ -222,6 +222,16 @@ shfs_file_flush(struct file *f)
44 +#ifdef FLUSH_HAS_LOCK_OWNER
45 +shfs_file_flush(struct file *f, fl_owner_t id)
47 +shfs_file_flush(struct file *f)
50 + return do_file_flush(f);
54 shfs_file_release(struct inode *inode, struct file *f)
56 struct dentry *dentry = f->f_dentry;
57 @@ -311,7 +321,7 @@ shfs_slow_write(struct file *f, const ch
59 written = generic_file_write(f, buf, count, offset);
61 - result = shfs_file_flush(f);
62 + result = do_file_flush(f);
63 written = result < 0 ? result: written;
66 Index: shfs-0.35/shfs/Linux-2.6/proc.c
67 ===================================================================
68 --- shfs-0.35.orig/shfs/Linux-2.6/proc.c
69 +++ shfs-0.35/shfs/Linux-2.6/proc.c
70 @@ -570,6 +570,16 @@ error:
74 +#ifdef NEW_VFS_DENTRY_API
76 +shfs_statfs(struct dentry *dentry, struct kstatfs *attr)
78 + struct shfs_sb_info *info = info_from_sb(dentry->d_sb);
81 + return info->fops.statfs(info, attr);
85 shfs_statfs(struct super_block *sb, struct kstatfs *attr)
87 @@ -578,4 +588,5 @@ shfs_statfs(struct super_block *sb, stru
89 return info->fops.statfs(info, attr);
93 Index: shfs-0.35/shfs/Linux-2.6/shfs_fs.h
94 ===================================================================
95 --- shfs-0.35.orig/shfs/Linux-2.6/shfs_fs.h
96 +++ shfs-0.35/shfs/Linux-2.6/shfs_fs.h
99 #include <linux/ioctl.h>
100 #include <linux/pagemap.h>
101 +#include <linux/version.h>
103 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)
104 +#define NEW_VFS_DENTRY_API
105 +#define FLUSH_HAS_LOCK_OWNER
108 #define SHFS_MAX_AGE(info) (((info)->ttl * HZ) / 1000)
109 #define SOCKBUF_SIZE (SHFS_PATH_MAX * 10)
110 @@ -100,7 +106,12 @@ int reply(char *s);
111 void set_garbage(struct shfs_sb_info *info, int write, int count);
112 int get_name(struct dentry *d, char *name);
113 int shfs_notify_change(struct dentry *dentry, struct iattr *attr);
115 +#ifdef NEW_VFS_DENTRY_API
116 +int shfs_statfs(struct dentry *dentry, struct kstatfs *attr);
118 int shfs_statfs(struct super_block *sb, struct kstatfs *attr);
122 void shfs_set_inode_attr(struct inode *inode, struct shfs_fattr *fattr);
123 Index: shfs-0.35/shfs/Linux-2.6/symlink.c
124 ===================================================================
125 --- shfs-0.35.orig/shfs/Linux-2.6/symlink.c
126 +++ shfs-0.35/shfs/Linux-2.6/symlink.c
127 @@ -41,7 +41,7 @@ error:
133 shfs_follow_link(struct dentry *dentry, struct nameidata *nd)
135 struct shfs_sb_info *info = info_from_dentry(dentry);
136 @@ -61,7 +61,7 @@ shfs_follow_link(struct dentry *dentry,
137 DEBUG("%s\n", real_name);
138 result = vfs_follow_link(nd, real_name);
144 struct inode_operations shfs_symlink_inode_operations = {