summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Auty <ikelos@gentoo.org>2008-04-26 14:39:16 +0000
committerMike Auty <ikelos@gentoo.org>2008-04-26 14:39:16 +0000
commit836114a7f08c1e227fcd006f5ac62012d924a607 (patch)
tree7748d004e38fc526b969739020c20e794d00742e /app-emulation/vmware-modules/files
parentAdd patches for -r1 ebuilds to ensure they work on 2.6.25 and older kernels. (diff)
downloadgentoo-2-836114a7f08c1e227fcd006f5ac62012d924a607.tar.gz
gentoo-2-836114a7f08c1e227fcd006f5ac62012d924a607.tar.bz2
gentoo-2-836114a7f08c1e227fcd006f5ac62012d924a607.zip
Add patches for -r1 ebuilds to ensure they work on 2.6.25 and older kernels.
(Portage version: 2.1.5_rc6) (Signed Manifest commit)
Diffstat (limited to 'app-emulation/vmware-modules/files')
-rw-r--r--app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch89
1 files changed, 89 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch b/app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch
new file mode 100644
index 000000000000..6b1d58fc28b9
--- /dev/null
+++ b/app-emulation/vmware-modules/files/patches/vmblock/010_all_kernel-2.6.25.patch
@@ -0,0 +1,89 @@
+diff --git a/linux/dentry.c b/linux/dentry.c
+index a39bb76..07c6296 100644
+--- a/linux/dentry.c
++++ b/linux/dentry.c
+@@ -112,7 +112,7 @@ DentryOpRevalidate(struct dentry *dentry, // IN: dentry revalidating
+ LOG(4, "DentryOpRevalidate: [%s] no longer exists\n", iinfo->name);
+ return 0;
+ }
+- ret = actualNd.dentry && actualNd.dentry->d_inode;
++ ret = nd_dentry(&actualNd) && nd_dentry(&actualNd)->d_inode;
+ path_release(&actualNd);
+
+ LOG(8, "DentryOpRevalidate: [%s] %s revalidated\n",
+diff --git a/linux/filesystem.c b/linux/filesystem.c
+index fb6d0bf..e979072 100644
+--- a/linux/filesystem.c
++++ b/linux/filesystem.c
+@@ -273,7 +273,7 @@ Iget(struct super_block *sb, // IN: file system superblock object
+
+ ASSERT(sb);
+
+- inode = iget(sb, ino);
++ inode = iget_locked(sb, ino);
+ if (!inode) {
+ return NULL;
+ }
+@@ -301,7 +301,7 @@ Iget(struct super_block *sb, // IN: file system superblock object
+ return inode;
+ }
+
+- iinfo->actualDentry = actualNd.dentry;
++ iinfo->actualDentry = nd_dentry(&actualNd);
+ path_release(&actualNd);
+
+ return inode;
+@@ -307,7 +307,7 @@ Iget(struct super_block *sb, // IN: file system superblock object
+ return inode;
+
+ error_inode:
+- iput(inode);
++ iget_failed(inode);
+ return NULL;
+ }
+
+diff --git a/linux/filesystem.h b/linux/filesystem.h
+index 697d112..0f5f32f 100644
+--- a/linux/filesystem.h
++++ b/linux/filesystem.h
+@@ -51,6 +51,27 @@
+
+ #include "vm_basic_types.h"
+
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 24)
++#define nd_dentry(nd) (nd)->path.dentry
++#define nd_mnt(nd) (nd)->path.mnt
++
++static inline void path_release(struct nameidata *nd)
++{
++ path_put(&nd->path);
++}
++
++#else
++#define nd_dentry(nd) (nd)->dentry
++#define nd_mnt(nd) (nd)->mnt
++
++static inline void iget_failed(struct inode *inode)
++{
++ make_bad_inode(inode);
++ unlock_new_inode(inode);
++ iput(inode);
++}
++#endif
++
+ #ifndef container_of
+ #define container_of(ptr, type, memb) ((type *)((char *)(ptr) - offsetof(type, memb)))
+ #endif
+diff --git a/linux/super.c b/linux/super.c
+index 2f2a9aa..697917d 100644
+--- a/linux/super.c
++++ b/linux/super.c
+@@ -52,7 +52,7 @@ struct super_operations VMBlockSuperOps = {
+ #else
+ .clear_inode = SuperOpClearInode,
+ #endif
+- .read_inode = SuperOpReadInode,
++// .read_inode = SuperOpReadInode,
+ .statfs = SuperOpStatfs,
+ };
+