diff -rupN vmblock-only.orig/linux/inode.c vmblock-only/linux/inode.c --- vmblock-only.orig/linux/inode.c 2015-08-31 15:10:05.000000000 -0400 +++ vmblock-only/linux/inode.c 2015-08-31 12:35:40.000000000 -0400 @@ -44,11 +44,8 @@ static struct dentry *InodeOpLookup(stru static int InodeOpReadlink(struct dentry *, char __user *, int); #endif -#if 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); -#endif +static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie); + struct inode_operations RootInodeOps = { @@ -220,14 +217,7 @@ InodeOpReadlink(struct dentry *dentry, * *---------------------------------------------------------------------------- */ - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) -static void * -#else -static int -#endif -InodeOpFollowlink(struct dentry *dentry, // IN : dentry of symlink - struct nameidata *nd) // OUT: stores result +static const char *InodeOpFollowlink(struct dentry *dentry, void **cookie) { int ret; VMBlockInodeInfo *iinfo; @@ -244,7 +234,11 @@ InodeOpFollowlink(struct dentry *dentry, goto out; } - nd_set_link(nd, iinfo->name); +#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)