open-vm-tools/kernel-3_4.patch

46 lines
1.3 KiB
Diff

--- modules/linux/vmhgfs/filesystem.c.old 2012-06-08 11:46:42.000000000 +0000
+++ modules/linux/vmhgfs/filesystem.c 2012-06-08 11:47:57.000000000 +0000
@@ -31,6 +31,7 @@
#include <linux/list.h>
#include <linux/module.h>
#include <linux/pagemap.h>
+#include <linux/version.h>
#include "compat_cred.h"
#include "compat_dcache.h"
#include "compat_fs.h"
@@ -375,8 +376,11 @@
__func__));
goto exit;
}
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
tempRootDentry = d_alloc_root(rootInode);
+#else
+ tempRootDentry = d_make_root(rootInode);
+#endif
if (tempRootDentry == NULL) {
LOG(4, (KERN_WARNING "VMware hgfs: %s: Could not get "
"root dentry\n", __func__));
--- modules/linux/vmblock/linux/filesystem.c.old 2012-06-08 11:48:17.000000000 +0000
+++ modules/linux/vmblock/linux/filesystem.c 2012-06-08 11:49:05.000000000 +0000
@@ -29,6 +29,7 @@
#include <linux/proc_fs.h>
#include <linux/mount.h>
#include <linux/fs.h>
+#include <linux/version.h>
#include "compat_namei.h"
@@ -525,7 +526,11 @@
return -EINVAL;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
rootDentry = d_alloc_root(rootInode);
+#else
+ rootDentry = d_make_root(rootInode);
+#endif
if (!rootDentry) {
iput(rootInode);
return -ENOMEM;