1 diff -u -r vmblock-only/linux/dentry.c vmblock-only/linux/dentry.c
2 --- vmblock-only/linux/dentry.c 2011-03-26 04:03:06.000000000 +0100
3 +++ vmblock-only/linux/dentry.c 2011-05-14 19:05:49.000000000 +0200
5 actualDentry->d_op->d_revalidate) {
6 return actualDentry->d_op->d_revalidate(actualDentry, nd);
9 - if (path_lookup(iinfo->name, 0, &actualNd)) {
10 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
11 + if (kern_path(iinfo->name, 0, &actualNd)) {
13 + if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
15 LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name);
18 diff -u -r vmblock-only/linux/filesystem.c vmblock-only/linux/filesystem.c
19 --- vmblock-only/linux/filesystem.c 2011-03-26 04:03:06.000000000 +0100
20 +++ vmblock-only/linux/filesystem.c 2011-05-14 19:05:57.000000000 +0200
22 /* File system operations */
24 #if defined(VMW_GETSB_2618)
25 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
26 +static struct dentry *FsOpMount(struct file_system_type *fsType, int flags,
27 + const char *devName, void *rawData);
29 static int FsOpGetSb(struct file_system_type *fsType, int flags,
30 const char *devName, void *rawData, struct vfsmount *mnt);
33 static struct super_block *FsOpGetSb(struct file_system_type *fsType, int flags,
34 const char *devName, void *rawData);
36 static struct file_system_type fsType = {
38 .name = VMBLOCK_FS_NAME,
39 + #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
44 .kill_sb = kill_anon_super,
48 Warning("Iget: could not make full name\n");
52 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
53 + if (kern_path(iinfo->name, 0, &actualNd)) {
55 if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
58 * This file does not exist, so we create an inode that doesn't know
59 * about its underlying file. Operations that create files and
65 #if defined(VMW_GETSB_2618)
67 *-----------------------------------------------------------------------------
70 + * FsOpGetSb/FsOpMount --
72 * Invokes generic kernel code to prepare superblock for
73 * deviceless filesystem.
77 + * 0/dentry on success
78 * negative error code on failure
83 *-----------------------------------------------------------------------------
85 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
87 +FsOpMount(struct file_system_type *fs_type, // IN: file system type of mount
88 + int flags, // IN: mount flags
89 + const char *dev_name, // IN: device mounting on
90 + void *rawData) // IN: mount arguments
92 + return mount_nodev(fs_type, flags, rawData, FsOpReadSuper);
97 FsOpGetSb(struct file_system_type *fs_type, // IN: file system type of mount
98 int flags, // IN: mount flags
101 return get_sb_nodev(fs_type, flags, rawData, FsOpReadSuper, mnt);
106 *-----------------------------------------------------------------------------
107 diff -u -r vmblock-only/linux/module.c vmblock-only/linux/module.c
108 --- vmblock-only/linux/module.c 2011-03-26 04:03:06.000000000 +0100
109 +++ vmblock-only/linux/module.c 2011-05-14 20:01:54.000000000 +0200
115 ret = VMBlockInitControlOps();