]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
HGFS: make Linux client work with Linux 3.9.0 kernel
authorVMware, Inc <>
Fri, 12 Apr 2013 19:49:58 +0000 (12:49 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Wed, 17 Apr 2013 19:16:54 +0000 (12:16 -0700)
More kernel changes have broken the Linux HGFS client.
Fix the hlist macro which now only uses 3 arguments.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/modules/linux/vmhgfs/inode.c

index dd291aa9dbcb14cfb958c60f710733d5d5a9e2c4..60bb31a16e6c8cbc5b249b483baec1bbf06c036f 100644 (file)
@@ -1810,6 +1810,7 @@ HgfsAccessInt(struct dentry *dentry, // IN: dentry to check access for
  *
  *----------------------------------------------------------------------
  */
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
 static int
 HgfsPermission(struct inode *inode,
@@ -1823,13 +1824,20 @@ HgfsPermission(struct inode *inode,
     */
    if (mask & MAY_ACCESS) { /* For sys_access. */
       struct dentry *dentry;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
       struct hlist_node *p;
+#endif
 
       if (mask & MAY_NOT_BLOCK)
          return -ECHILD;
 
       /* Find a dentry with valid d_count. Refer bug 587879. */
-      hlist_for_each_entry(dentry, p, &inode->i_dentry, d_alias) {
+      hlist_for_each_entry(dentry,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
+                           p,
+#endif
+                           &inode->i_dentry,
+                           d_alias) {
          int dcount = dentry->d_count;
          if (dcount) {
             LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));