--- a/modules/linux/vmhgfs/inode.c 2013-08-15 22:32:22.000000000 -0700 +++ b/modules/linux/vmhgfs/inode.c 2013-09-16 21:31:12.323041668 -0700 @@ -31,6 +31,9 @@ #include #endif #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) +#include +#endif #include "compat_cred.h" #include "compat_fs.h" @@ -1890,7 +1893,11 @@ #endif &inode->i_dentry, d_alias) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) + int dcount = d_count(dentry); +#else int dcount = dentry->d_count; +#endif if (dcount) { LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount)); return HgfsAccessInt(dentry, mask & (MAY_READ | MAY_WRITE | MAY_EXEC)); @@ -1943,10 +1950,12 @@ list_for_each(pos, &inode->i_dentry) { int dcount; struct dentry *dentry = list_entry(pos, struct dentry, d_alias); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38) - dcount = atomic_read(&dentry->d_count); -#else +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) + dcount = d_count(dentry); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) dcount = dentry->d_count; +#else + dcount = atomic_read(&dentry->d_count); #endif if (dcount) { LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));