diff -Nur vmhgfs-only.orig/compat_fs.h vmhgfs-only/compat_fs.h
--- vmhgfs-only.orig/compat_fs.h	2008-03-19 03:29:59.000000000 +0100
+++ vmhgfs-only/compat_fs.h	2008-05-14 10:11:15.000000000 +0200
@@ -102,6 +102,14 @@
 # define VMW_EMBED_INODE
 #endif
 
+/*
+ * iget() was removed from the VFS as of 2.6.25-rc1. The replacement for iget()
+ * is iget_locked() which was added in 2.5.17.
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 17)
+# define VMW_USE_IGET_LOCKED
+#endif
+
 
 /*
  * parent_ino was born in 2.5.5. For older kernels, let's use 2.5.5
diff -Nur vmhgfs-only.orig/compat_slab.h vmhgfs-only/compat_slab.h
--- vmhgfs-only.orig/compat_slab.h	2008-03-19 03:29:59.000000000 +0100
+++ vmhgfs-only/compat_slab.h	2008-05-14 10:16:18.000000000 +0200
@@ -50,4 +50,21 @@
 		kmem_cache_create(name, size, align, flags, ctor)
 #endif
 
+/*
+ * Up to 2.6.23 kmem_cache constructor has three arguments - pointer to block to
+ * prepare (aka "this"), from which cache it came, and some unused flags.  After
+ * 2.6.23 flags were removed, and order of "this" and cache parameters was swapped...
+ *
+ * Backported from open-vm-tools
+ * by Alexander Griesser <work@tuxx-home.at>, 2008-05-14
+ */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) && !defined(VMW_KMEMCR_CTOR_HAS_3_ARGS)
+#  define VMW_KMEMCR_CTOR_HAS_3_ARGS
+#endif
+#ifdef VMW_KMEMCR_CTOR_HAS_3_ARGS
+typedef void compat_kmem_cache_ctor(void *, compat_kmem_cache *, unsigned long);
+#else
+typedef void compat_kmem_cache_ctor(compat_kmem_cache *, void *);
+#endif
+
 #endif /* __COMPAT_SLAB_H__ */
diff -Nur vmhgfs-only.orig/driver-config.h vmhgfs-only/driver-config.h
--- vmhgfs-only.orig/driver-config.h	2008-03-19 03:29:59.000000000 +0100
+++ vmhgfs-only/driver-config.h	2008-05-14 10:00:25.000000000 +0200
@@ -35,6 +35,23 @@
 #include <linux/autoconf.h>
 #include "compat_version.h"
 
+/*
+ * I still haven't figured out why the automagic checks in Makefile.kernel
+ * don't work. They call the script vm_check_build which isn't available
+ * on any of my systems so `make` is unable to find out whether this features
+ * need to be included or not.
+ *
+ * A simple workaround is to rely on the kernel configuration as shown below.
+ * If CONFIG_EPOLL is set, we have EPOLL set, basta.
+ *
+ * by Alexander Griesser <work@tuxx-home.at>, 2008-03-14
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+#ifdef CONFIG_EPOLL
+#define VMW_HAVE_EPOLL 1
+#endif
+#endif
+
 /* We rely on Kernel Module support.  Check here. */
 #ifndef CONFIG_MODULES
 #error "No Module support in this kernel.  Please configure with CONFIG_MODULES"
@@ -59,6 +76,18 @@
 #endif
 #endif
 
+/*
+ * Force the uintptr_t definition to come from linux/types.h instead of
+ * vm_basic_types.h
+ *
+ * Backported from open-vm-tools
+ * by Alexander Griesser <work@tuxx-home.at>, 2008-04-27
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+#   include <linux/types.h>
+#   define _STDINT_H 1
+#endif
+
 #ifndef __KERNEL__
 #define __KERNEL__
 #endif
diff -Nur vmhgfs-only.orig/filesystem.c vmhgfs-only/filesystem.c
--- vmhgfs-only.orig/filesystem.c	2008-03-19 03:29:59.000000000 +0100
+++ vmhgfs-only/filesystem.c	2008-05-14 10:07:45.000000000 +0200
@@ -92,9 +92,7 @@
 
 /* Private functions. */
 static inline unsigned long HgfsComputeBlockBits(unsigned long blockSize);
-static void HgfsInodeCacheCtor(void *slabElem,
-                               compat_kmem_cache *cache,
-                               unsigned long flags);
+static compat_kmem_cache_ctor HgfsInodeCacheCtor;
 static HgfsSuperInfo *HgfsInitSuperInfo(HgfsMountInfo *mountInfo);
 static int HgfsReadSuper(struct super_block *sb, 
                          void *rawData, 
@@ -190,13 +188,20 @@
  * Side effects:
  *      None.
  *
+ * CTOR_HAS_3_ARGS check backported from open-vm-tools
+ * by Alexander Griesser <work@tuxx-home.at>, 2008-05-14
  *-----------------------------------------------------------------------------
  */
-
+#ifdef VMW_KMEMCR_CTOR_HAS_3_ARGS
 static void
 HgfsInodeCacheCtor(void *slabElem,           // IN: slab item to initialize
                    compat_kmem_cache *cache, // IN: cache slab is from
                    unsigned long flags)      // IN: flags associated with allocation
+#else
+static void
+HgfsInodeCacheCtor(compat_kmem_cache *cache, // IN: cache slab is from
+                   void *slabElem)           // IN: slab item to initialize
+#endif
 {
 #ifdef VMW_EMBED_INODE
    HgfsInodeInfo *iinfo = (HgfsInodeInfo *)slabElem;
diff -Nur vmhgfs-only.orig/fsutil.c vmhgfs-only/fsutil.c
--- vmhgfs-only.orig/fsutil.c	2008-03-19 03:29:59.000000000 +0100
+++ vmhgfs-only/fsutil.c	2008-05-14 10:21:29.000000000 +0200
@@ -1014,7 +1014,7 @@
    
 
    /* Now we have a good inode number, get the inode itself. */
-   inode = iget(sb, ino);
+   inode = HgfsGetInode(sb, ino);
    if (inode) {
 
       /* 
@@ -1609,3 +1609,96 @@
       return -EIO;
    }
 }
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * HgfsGetInode --
+ *
+ *    This function replaces iget() and should be called instead of it. In newer
+ *    kernels that have removed the iget() interface,  GetInode() obtains an inode
+ *    and if it is a new one, then initializes the inode by calling
+ *    HgfsDoReadInode(). In older kernels that support the iget() interface,
+ *    HgfsDoReadInode() is called by iget() internally.
+ *
+ * Results:
+ *    A new inode object on success, NULL on error.
+ *
+ * Side effects:
+ *    None.
+ *
+ * Backported from open-vm-tools 
+ * by Alexander Griesser <work@tuxx-home.at>, 2008-05-14
+ *----------------------------------------------------------------------------
+ */
+
+struct inode *
+HgfsGetInode(struct super_block *sb, // IN: file system superblock object
+             ino_t ino)              // IN: inode number to assign to new inode
+{
+#ifdef VMW_USE_IGET_LOCKED
+   struct inode *inode;
+
+   inode = iget_locked(sb, ino);
+   if (inode && (inode->i_state & I_NEW)) {
+      HgfsDoReadInode(inode);
+      unlock_new_inode(inode);
+   }
+   return inode;
+#else
+   return iget(sb, ino);
+#endif
+}
+
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ *  HgfsDoReadInode --
+ *
+ *    A filesystem wide function that is called to initialize a new inode.
+ *    This is called from two different places depending on the kernel version.
+ *    In older kernels that provide the iget() interface, this function is
+ *    called by the kernel as part of inode initialization (from
+ *    HgfsDoReadInode). In newer kernels that call iget_locked(), this
+ *    function is called by filesystem code to initialize the new inode.
+ *
+ * Results:
+ *    None.
+ *
+ * Side effects:
+ *    None.
+ *
+ * Backported from open-vm-tools
+ * by Alexander Griesser <work@tuxx-home.at>, 2008-05-14
+ *----------------------------------------------------------------------------
+ */
+void
+HgfsDoReadInode(struct inode *inode)  // IN: Inode to initialize
+{
+   HgfsInodeInfo *iinfo = INODE_GET_II_P(inode);
+
+   /*
+    * If the vfs inode is not embedded within the HgfsInodeInfo, then we
+    * haven't yet allocated the HgfsInodeInfo. Do so now.
+    *
+    * XXX: We could allocate with GFP_ATOMIC. But instead, we'll do a standard
+    * allocation and mark the inode "bad" if the allocation fails. This'll
+    * make all subsequent operations on the inode fail, which is what we want.
+    */
+#ifndef VMW_EMBED_INODE
+   iinfo = kmem_cache_alloc(hgfsInodeCache, GFP_KERNEL);
+   if (!iinfo) {
+      LOG(4, (KERN_DEBUG "VMware hgfs: HgfsDoReadInode: no memory for "
+              "iinfo!\n"));
+      make_bad_inode(inode);
+      return;
+   }
+#endif
+   INODE_SET_II_P(inode, iinfo);
+   INIT_LIST_HEAD(&iinfo->files);
+   iinfo->isReferencedInode = FALSE;
+   iinfo->isFakeInodeNumber = FALSE;
+   iinfo->createdAndUnopened = FALSE;
+
+}
diff -Nur vmhgfs-only.orig/fsutil.h vmhgfs-only/fsutil.h
--- vmhgfs-only.orig/fsutil.h	2008-03-19 03:29:59.000000000 +0100
+++ vmhgfs-only/fsutil.h	2008-05-14 10:13:40.000000000 +0200
@@ -93,5 +93,7 @@
                   HgfsOpenMode mode,
                   HgfsHandle *handle);
 int HgfsStatusConvertToLinux(HgfsStatus hgfsStatus);
+struct inode *HgfsGetInode(struct super_block *sb, ino_t ino);
+void HgfsDoReadInode(struct inode *inode);
 
 #endif // _HGFS_DRIVER_FSUTIL_H_
diff -Nur vmhgfs-only.orig/modules.order vmhgfs-only/modules.order
--- vmhgfs-only.orig/modules.order	1970-01-01 01:00:00.000000000 +0100
+++ vmhgfs-only/modules.order	2008-05-14 10:17:11.000000000 +0200
@@ -0,0 +1 @@
+kernel//root/tools.new/vmhgfs-only/vmhgfs.ko
diff -Nur vmhgfs-only.orig/super.c vmhgfs-only/super.c
--- vmhgfs-only.orig/super.c	2008-03-19 03:29:59.000000000 +0100
+++ vmhgfs-only/super.c	2008-05-14 10:12:50.000000000 +0200
@@ -50,7 +50,9 @@
 static struct inode *HgfsAllocInode(struct super_block *sb);
 static void HgfsDestroyInode(struct inode *inode);
 #endif
+#ifndef VMW_USE_IGET_LOCKED
 static void HgfsReadInode(struct inode *inode);
+#endif
 static void HgfsClearInode(struct inode *inode);
 static void HgfsPutSuper(struct super_block *sb);
 #if defined(VMW_STATFS_2618)
@@ -66,7 +68,9 @@
    .alloc_inode   = HgfsAllocInode,
    .destroy_inode = HgfsDestroyInode,
 #endif
+#ifndef VMW_USE_IGET_LOCKED
    .read_inode    = HgfsReadInode,
+#endif
    .clear_inode   = HgfsClearInode,
    .put_super     = HgfsPutSuper,
    .statfs        = HgfsStatfs,
@@ -134,6 +138,9 @@
 }
 
 #endif
+
+
+#ifndef VMW_USE_IGET_LOCKED
 /*
  *-----------------------------------------------------------------------------
  *
@@ -154,31 +161,9 @@
 static void
 HgfsReadInode(struct inode *inode) // IN/OUT: VFS inode to fill in
 {
-   HgfsInodeInfo *iinfo = INODE_GET_II_P(inode);
-
-   /*
-    * If the vfs inode is not embedded within the HgfsInodeInfo, then we
-    * haven't yet allocated the HgfsInodeInfo. Do so now.
-    * 
-    * XXX: We could allocate with GFP_ATOMIC. But instead, we'll do a standard
-    * allocation and mark the inode "bad" if the allocation fails. This'll
-    * make all subsequent operations on the inode fail, which is what we want.
-    */
-#ifndef VMW_EMBED_INODE
-   iinfo = kmem_cache_alloc(hgfsInodeCache, GFP_KERNEL);
-   if (!iinfo) {
-      LOG(4, (KERN_DEBUG "VMware hgfs: HgfsReadInode: no memory for "
-              "iinfo!\n"));
-      make_bad_inode(inode);
-      return;
-   }
-#endif
-   INODE_SET_II_P(inode, iinfo);
-   INIT_LIST_HEAD(&iinfo->files);
-   iinfo->isReferencedInode = FALSE;
-   iinfo->isFakeInodeNumber = FALSE;
-   iinfo->createdAndUnopened = FALSE;
+   HgfsDoReadInode(inode);
 }
+#endif
 
 
 /*
diff -Nur vmhgfs-only.orig/vm_basic_types.h vmhgfs-only/vm_basic_types.h
--- vmhgfs-only.orig/vm_basic_types.h	2008-03-19 03:29:59.000000000 +0100
+++ vmhgfs-only/vm_basic_types.h	2008-05-14 10:04:28.000000000 +0200
@@ -39,6 +39,7 @@
 #define INCLUDE_ALLOW_VMCORE
 #define INCLUDE_ALLOW_VMIROM
 #include "includeCheck.h"
+#include "driver-config.h"
 
 /* STRICT ANSI means the Xserver build and X defines Bool differently. */
 #if !defined(__STRICT_ANSI__) || defined(__FreeBSD__)

