From 61f72c675dbd2ad269a2506f79cbf8b3c22cdc2e Mon Sep 17 00:00:00 2001 From: Godzil Date: Thu, 25 Jul 2019 16:31:57 +0100 Subject: [PATCH] Fix kernel-5.1.y and 5.2.y Fix #13 and Fix #14 --- kfusd/kfusd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kfusd/kfusd.c b/kfusd/kfusd.c index 60d751b..2508d7c 100755 --- a/kfusd/kfusd.c +++ b/kfusd/kfusd.c @@ -1614,15 +1614,14 @@ static void fusd_client_mm_open(struct vm_area_struct *vma); static void fusd_client_mm_close(struct vm_area_struct *vma); -/* int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) +static vm_fault_t fusd_client_fault (struct vm_fault *vmf); +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) static int fusd_client_fault (struct vm_fault *vmf); #elif LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 30) static int fusd_client_fault (struct vm_area_struct *vma, struct vm_fault *vmf); #else - static int fusd_client_fault(struct vm_area_struct *vma, struct vm_fault *vmf, int *type); - #endif static struct vm_operations_struct fusd_remap_vm_ops = { @@ -1736,7 +1735,9 @@ zombie_dev: return -EPIPE; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) +static vm_fault_t fusd_client_fault (struct vm_fault *vmf) +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) static int fusd_client_fault (struct vm_fault *vmf) #elif LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 30) static int fusd_client_fault (struct vm_area_struct *vma, struct vm_fault *vmf)