summaryrefslogtreecommitdiff
blob: 66609bff6308c1af1e9a034d2b74eae829dcb9c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- vmci-only/linux/driver.c	2015-02-07 01:11:55.000000000 +0100
+++ vmci-only/linux/driver.c.new	2015-07-23 00:28:25.713804866 +0200
@@ -37,6 +37,7 @@
 #include <linux/moduleparam.h>
 #include <linux/poll.h>
 #include <linux/smp.h>
+#include <linux/vmalloc.h>
 
 #include "compat_highmem.h"
 #include "compat_interrupt.h"
--- vmblock-only/linux/inode.c	2015-08-23 00:34:11.959377109 +0200
+++ vmblock-only/linux/inode.c.new	2015-08-23 00:37:49.839389292 +0200
@@ -38,7 +38,9 @@
 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, 1, 99)
+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);
@@ -203,13 +205,19 @@
  *----------------------------------------------------------------------------
  */
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
+static const char *
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
 static void *
 #else
 static int
 #endif
 InodeOpFollowlink(struct dentry *dentry,  // IN : dentry of symlink
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
+                  void **cookie)          // OUT: stores opaque pointer
+#else
                   struct nameidata *nd)   // OUT: stores result
+#endif
 {
    int ret;
    VMBlockInodeInfo *iinfo;
@@ -226,7 +234,11 @@
       goto out;
    }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 99)
+   return *cookie = iinfo->name;
+#else
    nd_set_link(nd, iinfo->name);
+#endif
 
 out:
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)