updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / vmware-patch / vmblock-2.6.39.diff
blobd43bf17155d978641c7238f576b06e75bf4e66f0
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
4 @@ -103,8 +103,11 @@
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)) {
12 +#else
13 + if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
14 +#endif
15 LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name);
16 return 0;
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
21 @@ -44,8 +44,13 @@
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);
28 +#else
29 static int FsOpGetSb(struct file_system_type *fsType, int flags,
30 const char *devName, void *rawData, struct vfsmount *mnt);
31 +#endif
32 #else
33 static struct super_block *FsOpGetSb(struct file_system_type *fsType, int flags,
34 const char *devName, void *rawData);
35 @@ -66,7 +71,11 @@
36 static struct file_system_type fsType = {
37 .owner = THIS_MODULE,
38 .name = VMBLOCK_FS_NAME,
39 + #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
40 + .mount = FsOpMount,
41 + #else
42 .get_sb = FsOpGetSb,
43 + #endif
44 .kill_sb = kill_anon_super,
47 @@ -335,8 +344,11 @@
48 Warning("Iget: could not make full name\n");
49 goto error_inode;
52 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
53 + if (kern_path(iinfo->name, 0, &actualNd)) {
54 +#else
55 if (compat_path_lookup(iinfo->name, 0, &actualNd)) {
56 +#endif
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
60 @@ -533,18 +545,17 @@
61 return 0;
65 #if defined(VMW_GETSB_2618)
67 *-----------------------------------------------------------------------------
69 - * FsOpGetSb --
70 + * FsOpGetSb/FsOpMount --
72 * Invokes generic kernel code to prepare superblock for
73 * deviceless filesystem.
75 * Results:
76 - * 0 on success
77 + * 0/dentry on success
78 * negative error code on failure
80 * Side effects:
81 @@ -552,7 +563,17 @@
83 *-----------------------------------------------------------------------------
85 +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
86 +struct dentry *
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);
95 +#else
96 static int
97 FsOpGetSb(struct file_system_type *fs_type, // IN: file system type of mount
98 int flags, // IN: mount flags
99 @@ -562,6 +583,7 @@
101 return get_sb_nodev(fs_type, flags, rawData, FsOpReadSuper, mnt);
103 +#endif
104 #else
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
110 @@ -78,7 +78,6 @@
111 VMBlockInit(void)
113 int ret;
115 ret = VMBlockInitControlOps();
116 if (ret < 0) {
117 goto error;