diff options
Diffstat (limited to 'app-emulation/vmware-modules/files/304-4.2-00-inode_op.patch')
-rw-r--r-- | app-emulation/vmware-modules/files/304-4.2-00-inode_op.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/304-4.2-00-inode_op.patch b/app-emulation/vmware-modules/files/304-4.2-00-inode_op.patch new file mode 100644 index 000000000000..e6f2acbbb6a0 --- /dev/null +++ b/app-emulation/vmware-modules/files/304-4.2-00-inode_op.patch @@ -0,0 +1,45 @@ +diff -rupN vmblock-only/linux/inode.c vmblock-only.new/linux/inode.c +--- vmblock-only/linux/inode.c 2016-03-16 21:24:25.771034759 -0400 ++++ vmblock-only.new/linux/inode.c 2016-03-16 21:26:22.697036311 -0400 +@@ -44,7 +44,9 @@ static struct dentry *InodeOpLookup(stru + static int InodeOpReadlink(struct dentry *, char __user *, int); + #endif + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) + static void *InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd); + #else + static int InodeOpFollowlink(struct dentry *dentry, struct nameidata *nd); +@@ -220,7 +222,9 @@ InodeOpReadlink(struct dentry *dentry, + * + *---------------------------------------------------------------------------- + */ +- ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie) ++#else + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) + static void * + #else +@@ -228,6 +232,7 @@ static int + #endif + InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink + struct nameidata *nd) // OUT: stores result ++#endif + { + int ret; + VMBlockInodeInfo *iinfo; +@@ -244,7 +249,11 @@ InodeOpFollowlink(struct dentry *dentry, + goto out; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) ++ return *cookie = (char *)(iinfo->name); ++#else + nd_set_link(nd, iinfo->name); ++#endif + + out: + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) |