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
57
58
59
60
|
From 3864ee84372e03e080a2b7c830e30db47d9a4415 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Thu, 25 May 2017 13:15:56 -0400
Subject: [PATCH] fix kernel 4.11.y
---
prl_fs/SharedFolders/Guest/Linux/prl_fs/file.c | 7 ++++++-
prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c | 8 ++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/prl_fs/SharedFolders/Guest/Linux/prl_fs/file.c b/prl_fs/SharedFolders/Guest/Linux/prl_fs/file.c
index 7e987e8..d8a364b 100644
--- a/prl_fs/SharedFolders/Guest/Linux/prl_fs/file.c
+++ b/prl_fs/SharedFolders/Guest/Linux/prl_fs/file.c
@@ -327,7 +327,9 @@ out:
#endif
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
+static int prlfs_fault (struct vm_fault *vmf)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
static int prlfs_fault (struct vm_area_struct *vma, struct vm_fault *vmf)
#else
static struct page *prlfs_nopage(struct vm_area_struct *vma,
@@ -347,6 +349,9 @@ static struct page *prlfs_nopage(struct vm_area_struct *vma,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
int retval;
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
+ struct vm_area_struct *vma = vmf->vma;
+#endif
DPRINTK("ENTER\n");
if (!vma->vm_file) {
diff --git a/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c b/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
index 7cb3f3e..d1426d8 100644
--- a/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
+++ b/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
@@ -531,9 +531,17 @@ struct dentry_operations prlfs_dentry_ops = {
};
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
+static int prlfs_getattr(const struct path *p, struct kstat *stat,
+ u32 request_mask, unsigned int flags)
+#else
static int prlfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat)
+#endif
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
+ struct dentry *dentry = p->dentry;
+#endif
int ret;
DPRINTK("ENTER\n");
if (check_dentry(dentry)) {
--
2.13.0
|