From: VMware, Inc <> Date: Fri, 12 Apr 2013 19:49:58 +0000 (-0700) Subject: HGFS: make Linux client work with Linux 3.9.0 kernel X-Git-Tag: 2013.04.16-1098359~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b9ca9a31ca999851e33d4804e5cd78a8a39641e;p=thirdparty%2Fopen-vm-tools.git HGFS: make Linux client work with Linux 3.9.0 kernel More kernel changes have broken the Linux HGFS client. Fix the hlist macro which now only uses 3 arguments. Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/modules/linux/vmhgfs/inode.c b/open-vm-tools/modules/linux/vmhgfs/inode.c index dd291aa9d..60bb31a16 100644 --- a/open-vm-tools/modules/linux/vmhgfs/inode.c +++ b/open-vm-tools/modules/linux/vmhgfs/inode.c @@ -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));